<HTML>
<HEAD>
<TITLE>Exclude directory from --delete</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I have the following 3 commands which are supposed to run every night to back up my web server:<BR>
<BR>
rsync -avve ssh --numeric-ids --delete --ignore-errors <a href="myuser@myisp.com:/usr/home/myuser">myuser@myisp.com:/usr/home/myuser</a> /Volumes/Downloads<BR>
rsync -avve ssh --copy-links --numeric-ids --delete --ignore-errors <a href="myuser@myisp.com:/usr/home/myuser/mail_boxes">myuser@myisp.com:/usr/home/myuser/mail_boxes</a> /Volumes/Downloads/myuser/mail_boxesBU<BR>
rsync -avve ssh --copy-links --numeric-ids --delete --ignore-errors <a href="myuser@myisp.com:/usr/home/myuser/mail_boxes">myuser@myisp.com:/usr/home/myuser/mail_boxes</a> /Volumes/Downloads/myuser/mail_boxesBU<BR>
<BR>
The way this works is that there are two symlinks on the server to the mail_boxes and public_html directories. I didn&#8217;t want all the symlinks within those directories to be followed, so these I backup separately to mail_boxesBU and public_htmlBU respectively.<BR>
<BR>
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&#8217;t always work for some reason, and the next morning one or both of the directories are just gone.<BR>
<BR>
Is there some way of excluding the mail_boxesBU and public_htmlBU directories from --delete?<BR>
<BR>
Thanks.<BR>
<BR>
Jeffrey</SPAN></FONT>
</BODY>
</HTML>