simple incremental backup woes. solutions?

Matt McCutchen matt at mattmccutchen.net
Thu Sep 4 22:48:28 GMT 2008


On Wed, 2008-09-03 at 17:59 +0200, The Peach wrote:
>  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.

It's not clear to me what the problem is, since the "cannot delete a
non-empty dir" message is pretty harmless.  Do you want the directories
to be renamed?  If so, should the individual files inside be renamed
too?  A naive implementation of either behavior that works in the
absence of nonperishable protect filters would be quite easy.  Note that
the current behavior has the advantage or disadvantage (depending on
your point of view) that all versions of the file at a given path are
kept together even if an ancestor directory is deleted and recreated.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080904/8e1042a0/attachment.bin


More information about the rsync mailing list