Trouble with "--delete" with "--files-from"
wayned at samba.org
Thu Jul 29 17:14:16 GMT 2004
On Thu, Jul 29, 2004 at 03:09:06PM +0100, Richard Hopkins wrote:
> This is working well for me, except for the "--delete" bit. (When mailboxes
> are deleted on the source system I obviously want this reflected on the
Delete only affects directories that rsync has sent the contents of,
otherwise it wouldn't know what to delete. It sounds like you should be
using --exclude instead of --files-from, like the following (I made a
guess that the /temp2 arg from your original command was a typo since it
isn't leagal syntax to have two sources with --files-from).
Put this in a file named "ex":
... and run this:
rsync -quWae /usr/local/bin/ssh --delete --exclude-from=ex
/mnt2/sms/mail/ user at remote:/var/cyrus/backups/spo-ms
I think the trailing slash is what you want on the source -- only
remove it if you want the "mail" subdir to be included in "spo-ms".
More information about the rsync