Re: problem with --delete if I sync part of a dir
thanks, this was exactly what I needed ! greets, pepijn www.kangaroot.net !! On Tue, 15 Jan 2002, Dave Dykstra wrote: On Tue, Jan 15, 2002 at 10:01:59AM +0100, Palmans Pepijn wrote: 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@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. That is expected behavior. Rsync would have no way of knowing that it should delete just the missing i_* files or all files in the remote directory. Is there anything to do about this ? Not if you have any other files that don't start with i_* in the remote directory that you want to keep. If you don't you could use rsync -azv --stats -e ssh \ --include 'i_*' --exclude '*' --delete-excluded . user@host:/dir/ but that will delete all files except the i_* files in host:/dir/. - Dave Dykstra
problem with --delete if I sync part of a dir
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@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: [EMAIL PROTECTED]
Re: problem with --delete if I sync part of a dir
On Tue, Jan 15, 2002 at 10:01:59AM +0100, Palmans Pepijn wrote: 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@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. That is expected behavior. Rsync would have no way of knowing that it should delete just the missing i_* files or all files in the remote directory. Is there anything to do about this ? Not if you have any other files that don't start with i_* in the remote directory that you want to keep. If you don't you could use rsync -azv --stats -e ssh \ --include 'i_*' --exclude '*' --delete-excluded . user@host:/dir/ but that will delete all files except the i_* files in host:/dir/. - Dave Dykstra
Re: problem with --delete if I sync part of a dir
check this out: echo rsync -azv --stats -e ssh --delete i_* user@host:/dir/. it expands to sync -azv --stats -e ssh --delete all existing i_* files user@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@host:/dir/ Tim Conway [EMAIL PROTECTED] 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(, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), .\n ' There are some who call me Tim? Palmans Pepijn [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 01/15/2002 02:01 AM To: [EMAIL PROTECTED] 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@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: [EMAIL PROTECTED]