--delete-before doesn't seem to actually be deleting before transfer
Tim Edwards
tkedwards at fastmail.com.au
Tue Jul 21 10:18:45 MDT 2009
Matt McCutchen schrieb:
>> Thanks for the help but I've still had no luck with this. The command
>> now looks like:
>> backupstoremove.py | rsync -av --progress --no-p --no-g --delete-before
>> --stats --include-from=- --include=/media/300GIGHD/backups/dar/restore
>> --exclude="*.dar" /media/300GIGHD/backups/dar/
>> /media/BACKUPUSBSTICK/backups/
>>
>
> I forgot: the --delete-excluded option is needed so that the exclude
> does not protect destination directories from deletion. Before you give
> up, you might want to try again with that option.
>
>
Thanks, that looks like it's worked. However I've found that the effect
is the same as doing an rm -f before the transfer - since
--exclude=*.dar it removes all files, even the ones that are
--include'd, and then starts the transfer from scratch. Just using rm
keeps my script simpler and easier to read.
Regards
Tim
More information about the rsync
mailing list