Proper --exclude= syntax?
I'm currently syncing the home directories on two boxes with the syntax: dest-host# rsync -av -e "ssh" --delete --progress source-host:/home/ /home/ That's working well. Now I want to exclude /home/httpd/* from the process. (I don't want web changes on one box to affect the other box.) Which of the following is the best/correct one to use? 1) --exclude=/home/httpd/* 2) --exclude=/home/httpd/ 3) --exclude=/home/httpd 4) --exclude=httpd/* 5) --exclude=httpd/ 6) --exclude=httpd Thanks! -Dan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Proper --exclude= syntax?
On Wed, Jan 08, 2003 at 02:15:13PM -0800, Dan Kressin wrote: > I'm currently syncing the home directories on two boxes with the syntax: > > dest-host# rsync -av -e "ssh" --delete --progress source-host:/home/ /home/ > > That's working well. Now I want to exclude /home/httpd/* from the process. > (I don't want web changes on one box to affect the other box.) Which of the > following is the best/correct one to use? > > 1) --exclude=/home/httpd/* > 2) --exclude=/home/httpd/ > 3) --exclude=/home/httpd > 4) --exclude=httpd/* > 5) --exclude=httpd/ > 6) --exclude=httpd > None of the above. --exclude=/httpd/ Patterns are relative to the src/dest paths. The leading slash is the equivelant of a regex ^ leaving it off will match any directory named httpd however deep in the tree. -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Proper --exclude= syntax?
- Original Message - From: "Dan Kressin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 08, 2003 10:15 PM Subject: Proper --exclude= syntax? > I'm currently syncing the home directories on two boxes with the syntax: > > dest-host# rsync -av -e "ssh" --delete --progress source-host:/home/ /home/ > > That's working well. Now I want to exclude /home/httpd/* from the process. > (I don't want web changes on one box to affect the other box.) Which of the > following is the best/correct one to use? > > 1) --exclude=/home/httpd/* > 2) --exclude=/home/httpd/ > 3) --exclude=/home/httpd Won't work with command above. They refer to /home/home/httpd. > 4) --exclude=httpd/* Would sync perms on httpd, but not contents, also, would apply to all dirs called httpd anywhere in /home/. > 5) --exclude=httpd/ Would exclude all dirs called httpd anywhere in /home/. > 6) --exclude=httpd Would exclude all dirs or files called httpd anywhere in /home/. I would use --exclude=/httpd/ Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: Proper --exclude= syntax? <-- thanks!
--- jw schultz <[EMAIL PROTECTED]> wrote: > On Wed, Jan 08, 2003 at 02:15:13PM -0800, Dan Kressin wrote: > > I'm currently syncing the home directories on two boxes with the syntax: > > > > dest-host# rsync -av -e "ssh" --delete --progress source-host:/home/ > /home/ > > > > That's working well. Now I want to exclude /home/httpd/* from the > process. > > (I don't want web changes on one box to affect the other box.) Which of > the > > following is the best/correct one to use? [snip] > None of the above. > > --exclude=/httpd/ > > Patterns are relative to the src/dest paths. [snip] Thanks to both JW Schultz and Max B. who suggested the same solution and helpfully pointed out why my guesses were wrong. -Dan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html