Hello,

Here's what I'm using to copy files from source to
dest.

rsync -av --backup --backup-dir=02_06_01 --links \
      --delete dir /net/home/sam

Consider a file, say A, that is exactly the same on
the source and the dest.  We know rsync won't copy it
to the dest.

Case 1:
If A is removed from the source, then it will be
_moved_ to the backup dir. effectively deleting it.

Case 2:
If A has been modified on the dest., then A will be 
_moved_ to the backup dir. and the new copy will be
pushed to the dest.

The question: how can I tell whether file A in the
backup directory differs from the source or whether it
should be deleted?

Here's a small table illustrating what I'm looking
for. 
Dash (-) means no change to the file.

Source    Dest     Desired
 file     file     result
----------------------------
 -        -        no push
 modif.   -        push src.modified to dest.
 -        modif.   move dst.modified to backup &
                   push source
 modif.   modif.   move dst.modified to backup and 
                   push source
 delete   -        remove dest. file
 delete   modif.   move dst.modified to backup

Any suggestions on getting rsync to do this?  

Thanks,
Sam


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Reply via email to