--delete-before doesn't seem to actually be deleting before transfer

Tim Edwards tkedwards at fastmail.com.au
Tue Jul 14 05:01:29 MDT 2009


I have a script transferring some backup files onto a USB stick, which
has limited space. I use rsync 3.0.5 with the following command:
rsync -av --delete-before /local/backups/dir/backup1_todaysdate
/local/backups/dir/backup2_todaysdate
/local/backups/dir/backup3_todaysdate /USBstick/backups/dir

The USB stick runs out of space if more than 1 backup set is put on it,
so I'd assumed that by using the --delete-before option would first
scrub /USBstick/backups/dir of any files that I hadn't listed to be
transfered - is this how it works? Because it doesn't seem to work that
way - I have to manually delete the old backups from the USB stick
before transferring the new.

Thanks for any help

Tim Edwards


More information about the rsync mailing list