Question on using rsync delete option

Andy Lam andyl at
Tue Mar 12 04:43:20 EST 2002


I'm so sorry that I launched the previous email by mistake and  before I
had a chance to complete it.  Here is the summary of my previous

We would like to use rsync to mirror the contents from our internal
staging server ( A) to the external website (B) at our ISP without
delete some existing files on B.

On server B, we have applications that creates temporary lock files and
customer upload files which I have no ideas what to exclude.    The
--exclude option would be my last resort, but I just want to know if
there are better alternatives.

If I use the --delete option in rsync, all the temporary files at the
destination B will be deleted.  In contrast, if I don't use the --delete
option, the destination's temporary files will be intact, but any files
removed from the source, A will not be deleted at the destionation B.

It seems to me that the --delete option is either all  or none with the
--exclude option as exception.   Maintainning a static  list of exclude
files would be very difficult and cumbersome for future maintainance.

I have gone through the FAQ as far back as 2000, but couldn't find any
similar question.  Would appreciate very much if someone could please
give me some pointers.  Attached is the rsync command line that I use:

rsync --verbose --update --progress --stats --compress --ignore-existing
--delete --delete-after
--recursive --times --perms --links --dry-run --rsh=/usr/local/bin/ssh
--rsync-path /var/tmp/rsync /export/volx/documents/
destination_login at hostB:/export/volx  (notice I left dry-run there for

Thank you in advance for your help .

Andy Lam
andy.lam at

More information about the rsync mailing list