Friday, 6 September 2013

rsync numbered or dated backups

rsync numbered or dated backups

I would like to roll my own local incremental backup system. (my external
drive has 3GB, so it won't fill up for a long time. I do not need the
older backup files to be deleted, nor do I need to know when original
files disappeared. I just want to store all the old revisions.)
backintime has automatic nice versions, but I don't like that it is
creating 70,000 hard links everytime I change one file. It makes
intelligent searching through earlier backups VERY slow.
so, I would like a backup script that runs every few minutes and
presumably executes something like.
rsync -x -v -t -a -z --exclude '*Cache*' --exclude '*.vmdk' \
--exclude '*swapfile*' local-sourcedir local-destdir-on-usb
here is my problem. I may be editing a local file and make a change every
few minutes...and I want to preserve all saved snapshot-ed prior versions.
reading the gnu core documentation, it suggests that I use
--backup=numbered, but I think the standard linux rsync (version 3.0.9
protocol version 30) ignores this option.
does rsync have this feature built in elsewhere?
if not, should I write a (perl) program that looks at --itemized-changes
--dry-run first, and then renames everything that starts with a '.' and
runs it again as no dry-run? it won't be difficult, but I wonder whether
this just reinvents a wheel.

No comments:

Post a Comment