Question on using rsync delete option

tim.conway at tim.conway at
Tue Mar 12 10:50:24 EST 2002

Through what method might rsync determine whether a file on the 
destination is from the source and since deleted, or created on the 
destination, when even you have no way of knowing.  You would need a 
complete history of both filesystems, every create, rename, move, insert, 
delete, append, and unlink, in the correct order, in order to know which 
side a file came from, and in the case of duplicate filenames being 
created on each end, which one is the correct one.  Actually, in that 
case, you'd also need to know the intentions of the users creating the 
files.  This is not information that can be gathered by examining the 
state of the two filesystems, which is all rsync can do.    Your 
application appears to call more for a shared filesystem scheme.  Surely 
you're not mirroring or backing up to a location being locally changed in 
ways even you don't know.
It can do only what you tell it to do.

Tim Conway
tim.conway at
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
".\n" '
"There are some who call me.... Tim?"

Andy Lam <andyl at>
Sent by: rsync-admin at
03/11/2002 10:43 AM

        To:     rsync at
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Question on using rsync delete option


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

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list