Apologies, I think I'm wrong about my previous reply, just checked and --delete is "implied"...

You need to use --delete instead of just the --delete-before. You do not actually need the "before" bit as this is the default for -- delete.

-david

On 14 Jul 2009, at 12:01, Tim Edwards wrote:

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
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to