Re: the protect flag - P doesn't work with --relative option ?
Sorry, I think I wasn't much clear. Here is the exact issue: destHost#> ls /tmp/mydir/2008 file mydir3new preserve The below command deletes the "/tmp/mydir/2008/mydir3" directory. sourceHost#/tmp/mydir> rsync -avz --relative --delete --include='+ /2008/.' --filter='H /2008/mydir3' --exclude='- /2008/preserve' 2008/. destHost:/tmp/mydir sending incremental file list 2008/ deleting 2008/mydir3/ sent 138 bytes received 17 bytes 34.44 bytes/sec total size is 0 speedup is 0.00 The below command doesn't delete the "/tmp/mydir/2008/mydir3" directory but deletes "/tmp/mydir/2008/new/mydir3". Is there any way to tell rsync to delete "/tmp/mydir/2008/mydir3" directory from below command? sourceHost#/tmp/mydir/2008> rsync -avz --relative --delete --include='+ /new/.' --filter='H /mydir3' new/. destHost:/tmp/mydir/2008 sending incremental file list sent 73 bytes received 13 bytes 9.05 bytes/sec total size is 0 speedup is 0.00 sourceHost#/tmp/mydir/2008> rsync -avz --relative --delete --include='+ /new/.' --filter='H /mydir3' new/. destHost:/tmp/mydir/2008 sending incremental file list new/ deleting new/mydir3/ sent 76 bytes received 16 bytes 16.73 bytes/sec total size is 0 speedup is 0.00 Thanks, Paresh On Tue, Aug 4, 2009 at 12:55 AM, paresh masani wrote: > Hi, > > Basically, I want to preserve some of directories on destination side > conditionally and hence, I choose to use --filter option mentioned in rsync > man pages. I noticed that --filter option works as expected when I don't > have --relative option used but in below case it doesn't work. > > rsync -avz --relative --delete --filter='H /mydir2' --exclude='- > /preserve' mydir1/. destHost:/tmp/mydir > > I want to sync "/tmp/mydir/mydir1", delete "mydir2" and protect and hide > "preserve" directory on destination host. > > I noticed that rsync doesn't deletes the "mydir2" on destination host but > if I remove --relative then it does. Could anyone tell me is there any > dependencies between Hide and Protect flag with --relative option? How to > make rsync to delete directories with H flag set and --relative option > specified? > > Thanks. > > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
the protect flag - P doesn't work with --relative option ?
Hi, Basically, I want to preserve some of directories on destination side conditionally and hence, I choose to use --filter option mentioned in rsync man pages. I noticed that --filter option works as expected when I don't have --relative option used but in below case it doesn't work. rsync -avz --relative --delete --filter='H /mydir2' --exclude='- /preserve' mydir1/. destHost:/tmp/mydir I want to sync "/tmp/mydir/mydir1", delete "mydir2" and protect and hide "preserve" directory on destination host. I noticed that rsync doesn't deletes the "mydir2" on destination host but if I remove --relative then it does. Could anyone tell me is there any dependencies between Hide and Protect flag with --relative option? How to make rsync to delete directories with H flag set and --relative option specified? Thanks. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Possibly bug in rsync-3.0.6 when spaces are there in destination path
Thanks...that's correct. On Tue, Jul 28, 2009 at 5:11 PM, Matthias Schniedermeyer wrote: > On 28.07.2009 16:46, paresh masani wrote: > > ... > > let me know if I am missing something obvious. > > Option "-s" a.k.a. "--protect-args" is exactly for this. > > see 'man rsync' > > > > > > Bis denn > > -- > Real Programmers consider "what you see is what you get" to be just as > bad a concept in Text Editors as it is in women. No, the Real Programmer > wants a "you asked for it, you got it" text editor -- complicated, > cryptic, powerful, unforgiving, dangerous. > > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
How could be "total transferred file size" more than "total file size" ?
Hi, Please see below rsync-3.0.6 statistics. Number of files: 109651 Number of files transferred: 7013 Total file size: 6426699145 bytes Total transferred file size: 7531020054 bytes Literal data: 2060328093 bytes Matched data: 5472534579 bytes File list size: 3209170 File list generation time: 0.120 seconds File list transfer time: 0.000 seconds Total bytes sent: 2073977452 Total bytes received: 35624353 sent 2073977452 bytes received 35624353 bytes 213576.49 bytes/sec total size is 6426699145 speedup is 3.05 sent 2073977452 bytes received 35624354 bytes total size 6426699145 Could you please tell me how would it be possible that "total transferred file size" is more than "total file size" ? Thanks, Paresh -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Possibly bug in rsync-3.0.6 when spaces are there in destination path
The below command works perfectly and it creates "test file" on destination host. rsync -avz /tmp/test\ file destination:/tmp/ sending incremental file list test file sent 91 bytes received 31 bytes 27.11 bytes/sec total size is 0 speedup is 0.00 The below two command doesn't work. The rsync creates "test" file on destination host in both of below cases. 1. I want to copy "/tmp/test file" to "/tmp/test with spaces" on destination. rsync -avz /tmp/test\ file destination:/tmp/test\ with\ spaces sending incremental file list test file sent 91 bytes received 31 bytes 27.11 bytes/sec total size is 0 speedup is 0.00 2. I want to copy source:/tmp/"test file" to Destination:/tmp/"test with spaces"/. The "test with spaces" is the existence folder on destination host. rsync -avz /tmp/test\ file destination:/tmp/test\ with\ spaces/ sending incremental file list test file sent 91 bytes received 31 bytes 27.11 bytes/sec total size is 0 speedup is 0.00 let me know if I am missing something obvious. Thanks, Paresh -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Rsync with spaces in source or destination path
Got it work with single slash. :-) # /usr/local/bin/rsync --archive /u/masanip/ACH/test\ file /tmp/mydir/ On Sun, Jul 5, 2009 at 2:34 AM, paresh masani wrote: > Please note that double quates is working but I want to make it work with > "\\\". > > For example, ==> /usr/local/bin/rsync --archive "/u/masanip/ACH/test file" > /tmp/mydir/ <== is working but ==> /usr/local/bin/rsync --archive > /u/masanip/ACH/test\\\ file /tmp/mydir/ <== not. > > Thanks. > > > On Sun, Jul 5, 2009 at 2:29 AM, paresh masani wrote: > >> Hi, I am trying to transfer a file that has spaces in its name. The rsync >> gives me below error. Am I doing anything wrong? >> >> #ls -l /tmp/test\ file >> -rw-rw-r-- 1 xxx xxx0 Jul 5 02:23 /tmp//test file >> >> # /usr/local/bin/rsync --archive /u/masanip/ACH/test\\\ file /tmp/mydir/ >> rsync: link_stat "/tmp/test\ file" failed: No such file or directory (2) >> >> Number of files: 0 >> Number of files transferred: 0 >> Total file size: 0 bytes >> Total transferred file size: 0 bytes >> Literal data: 0 bytes >> Matched data: 0 bytes >> File list size: 9 >> File list generation time: 0.001 seconds >> File list transfer time: 0.000 seconds >> Total bytes sent: 121 >> Total bytes received: 12 >> >> sent 121 bytes received 12 bytes 29.56 bytes/sec >> total size is 0 speedup is 0.00 >> rsync error: some files/attrs were not transferred (see previous errors) >> (code 23) at main.c(1039) [sender=3.0.6] >> >> Thanks. >> > > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Rsync with spaces in source or destination path
Please note that double quates is working but I want to make it work with "\\\". For example, ==> /usr/local/bin/rsync --archive "/u/masanip/ACH/test file" /tmp/mydir/ <== is working but ==> /usr/local/bin/rsync --archive /u/masanip/ACH/test\\\ file /tmp/mydir/ <== not. Thanks. On Sun, Jul 5, 2009 at 2:29 AM, paresh masani wrote: > Hi, I am trying to transfer a file that has spaces in its name. The rsync > gives me below error. Am I doing anything wrong? > > #ls -l /tmp/test\ file > -rw-rw-r-- 1 xxx xxx0 Jul 5 02:23 /tmp//test file > > # /usr/local/bin/rsync --archive /u/masanip/ACH/test\\\ file /tmp/mydir/ > rsync: link_stat "/tmp/test\ file" failed: No such file or directory (2) > > Number of files: 0 > Number of files transferred: 0 > Total file size: 0 bytes > Total transferred file size: 0 bytes > Literal data: 0 bytes > Matched data: 0 bytes > File list size: 9 > File list generation time: 0.001 seconds > File list transfer time: 0.000 seconds > Total bytes sent: 121 > Total bytes received: 12 > > sent 121 bytes received 12 bytes 29.56 bytes/sec > total size is 0 speedup is 0.00 > rsync error: some files/attrs were not transferred (see previous errors) > (code 23) at main.c(1039) [sender=3.0.6] > > Thanks. > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Rsync with spaces in source or destination path
Hi, I am trying to transfer a file that has spaces in its name. The rsync gives me below error. Am I doing anything wrong? #ls -l /tmp/test\ file -rw-rw-r-- 1 xxx xxx0 Jul 5 02:23 /tmp//test file # /usr/local/bin/rsync --archive /u/masanip/ACH/test\\\ file /tmp/mydir/ rsync: link_stat "/tmp/test\ file" failed: No such file or directory (2) Number of files: 0 Number of files transferred: 0 Total file size: 0 bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 9 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 121 Total bytes received: 12 sent 121 bytes received 12 bytes 29.56 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6] Thanks. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: difference between --no-implied-dir abd --keep-dirlinks ?
Thanks Wayne; I understood your point but two more questions arise from details given by you is, if I have --keep-dirlinks specified but not --no-implied-dir then also it sends directory attributes, and the destination is forced to match that results into losing destination symlinks? I have tested this and noticed that it doesn't remove destination symlinks. The other question is, if I specified --no-implied-dir then would rsync synch symlinks and directory entries if same are not available at destination? I have tested this but still confusing in differentiating these two options. I am not able to find any differences. Could you help me out with one real example that show the difference between these options? Jignesh On Tue, Jun 30, 2009 at 9:09 PM, Wayne Davison wrote: > On Mon, Jun 29, 2009 at 10:33:34AM +0530, Jignesh Shah wrote: > > I have gone through the rsync documentation and also tested same both > > --no-implied-dir and --keep-dirlinks options. My question is what is the > > difference between these options in below scenario? > > Implied directories are those that are above the transfer area but > included as a part of the path due to the use of -R (--relative). By > default all implied directories get sent with their directory > attributes, and the destination is forced to match that. If you want > the implied paths to differ, --no-implied-dir will leave them alone. > > Using --keep-dirlinks also affects the transfer area, so that you can > put a symlink to a directory anyplace that the sender has a dir. > > ..wayne.. > -- > Please use reply-all for most replies to avoid omitting the mailing list. > To unsubscribe or change options: > https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html