Exclude directory from --delete

J. Ellis jellis at dhnet.us
Sat Oct 3 16:47:08 MDT 2009


I have the following 3 commands which are supposed to run every night to
back up my web server:

rsync -avve ssh --numeric-ids --delete --ignore-errors
myuser at myisp.com:/usr/home/myuser /Volumes/Downloads
rsync -avve ssh --copy-links --numeric-ids --delete --ignore-errors
myuser at myisp.com:/usr/home/myuser/mail_boxes
/Volumes/Downloads/myuser/mail_boxesBU
rsync -avve ssh --copy-links --numeric-ids --delete --ignore-errors
myuser at myisp.com:/usr/home/myuser/mail_boxes
/Volumes/Downloads/myuser/mail_boxesBU

The way this works is that there are two symlinks on the server to the
mail_boxes and public_html directories. I didn¹t want all the symlinks
within those directories to be followed, so these I backup separately to
mail_boxesBU and public_htmlBU respectively.

Unfortunately, when the first command is run, both are deleted from the
local volume, and then must be completely downloaded from scratch each night
after the deletion, instead of simply being updated. This doesn¹t always
work for some reason, and the next morning one or both of the directories
are just gone.

Is there some way of excluding the mail_boxesBU and public_htmlBU
directories from --delete?

Thanks.

Jeffrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20091003/2a80db5b/attachment.html>


More information about the rsync mailing list