simple incremental backup woes. solutions?

The Peach smartart at
Wed Sep 3 15:59:31 GMT 2008

Hi all,
 I've finally hit rsync limit. As someone already addressed the problem in this list the problem regards the impossibility for rsync to rename directories.
The situation is as follow:
every night I backup my samba dir with this command:

rsync -ab --suffix=-`date +%F-%H%M` --filter="protect *-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]" --delete --numeric-ids --stats -h /home/samba/ /mnt/usbdisk

as you can see, I simply rename the files deleted with the date they've been found deleted, hence providing a protect filter for the files with a date at the end (as you might imagine the machine serves windows clients).
Obviously (!) when a directory is deleted on the source dir, all the files in the destination will be renamed, but the dir will not, and rsync tries to delete it ending with a "cannot delete a non-empty dir".

I'm asking here because I need even a dirty solution to this problem.
I've been addressed to rsnapshot, but seems hard to replicate the same backup type I've setup, so I gave it up.

Any suggestion, solutions and such will be very much appreciated.

Thank you in advance,

Matteo 'Peach' Pescarin

More information about the rsync mailing list