problem with --delete if I sync part of a dir

tim.conway at philips.com tim.conway at philips.com
Wed Jan 16 04:53:01 EST 2002


check this out:  "echo rsync -azv --stats -e ssh --delete i_* user at host:/dir/".
it expands to "sync -azv --stats -e ssh --delete <all existing i_* files> user at host:/dir/"  It won't mention the ones that are gone.
rsync the directory/. including i_* and excluding * (the order matters).
rsync -azv --stats -e ssh --delete ./. --include=i_* --exclude=* 
user at host:/dir/

Tim Conway
tim.conway at philips.com
303.682.4917
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, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




Palmans Pepijn <pepijn at kangaroot.net>
Sent by: rsync-admin at lists.samba.org
01/15/2002 02:01 AM

 
        To:     rsync at lists.samba.org
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        problem with --delete if I sync part of a dir
        Classification: 



Hi,

I'm using rsync for a couple of things but I am at a point where I could 
not find a solution for my problem.

this is what I want to do:

rsync only the files i_* from a directory from machine A to machine Bi and 
delete them from machine B if they on longer exist on machine A.

so I use the command:

rsync -azv --stats -e ssh --delete i_* user at host:/dir/

When using this command the files starting with i_ will get placed on the 
remote server or even updated when I change them but if I delete a file on 
machine A it will not be deleted on machine B.
This is only a problem if I use i_* as my source.  If i sync whole 
directories (recursive or not) it's no problem at all to get files deleted 
on the other end.

Is there anything to do about this ?

Regards,

Pepijn Palmans

Kangaroot Linux Solutions
Grote Steenweg 91
2600 Berchem, Antwerpen, Belgium
Email: pepijn at kangaroot.net









More information about the rsync mailing list