Re: rsync does not --exclude: (??)

2006-10-28 Thread Malcolm Kay
On Sat, 28 Oct 2006 11:39 am, Lars Kristiansen wrote:
 Gary Kline skrev:
  People,
 
  Weeks ago I tried this *without* the --exclude flags and
  overwrote DOT file that I didn't want to.  Iust rechecked
  this use of rsync, saving important files from my work
  server elseswhere, and see that some files or directories
  are being listed and copied over.  IDoes anything obvious
  jump out here?
 
  gary
 
 
 
  #
  ## test2ethos.sh
  #
 
 rsync -Cptuvaz -n -e ssh -i
  /home/kline/.ssh/tao_XXXYYYZZZ-id \ --exclude
  /home/kline/.zlogin  \
 --exclude /home/kline/.zshrc  \
 --exclude /home/kline/.zhistory.*  \
 --exclude /home/kline/.ctwrm  \
 --exclude /home/kline/.mozilla  \
 --exclude /home/kline/.evolution  \
 --exclude /home/kline/4zip/  \
 --exclude '/home/kline/www/'  \
 /home/kline [EMAIL PROTECTED]:/home/kline

 Hope this might help.
  From man rsync:
 global include/exclude patterns are anchored at the root of
 the transfer in man rsync look for: INCLUDE/EXCLUDE PATTERN
 RULES and ANCHORING INCLUDE/EXCLUDE PATTERNS


Yes, it looks as though the anchoring of exclude arguments is 
more complex (or at least different) than I imagined. 
Never-the-less ambiguous arguments will still need to be quoted.

Malcolm

 Regards, Lars

 if [ $? =  0 ]
 then
echo rsync transfer went okay: tao to ethos
 else
echo rsync failed to ethos from /home/kline|mail
  [EMAIL PROTECTED] fi

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rsync does not --exclude: (??)

2006-10-27 Thread Malcolm Kay
On Sat, 28 Oct 2006 03:15 am, Gary Kline wrote:
   People,

   Weeks ago I tried this *without* the --exclude flags and
   overwrote DOT file that I didn't want to.  Iust rechecked
 this use of rsync, saving important files from my work server
 elseswhere, and see that some files or directories are being
 listed and copied over.  IDoes anything obvious jump out here?

   gary



 #
 ## test2ethos.sh
 #

rsync -Cptuvaz -n -e ssh -i
 /home/kline/.ssh/tao_XXXYYYZZZ-id \ --exclude
 /home/kline/.zlogin  \
--exclude /home/kline/.zshrc  \
--exclude /home/kline/.zhistory.*  \

An ambiguous argument to the --exclude 
option /home/kline/.zhistory.* will need to be quoted . . .
 --exclude '/home/kline/.zhistory.*' \

otherwise it is expanded by the shell before reaching rsync
and then only the first referenced file is preceded by --exclude.
So instead of being excluded the transfer of the rest of the 
expansion is emphasised. I don't know how rsync will then deal
with subsequent options.

--exclude /home/kline/.ctwrm  \
--exclude /home/kline/.mozilla  \
--exclude /home/kline/.evolution  \
--exclude /home/kline/4zip/  \
--exclude '/home/kline/www/'  \
/home/kline [EMAIL PROTECTED]:/home/kline
if [ $? =  0 ]
then
   echo rsync transfer went okay: tao to ethos
else
   echo rsync failed to ethos from /home/kline|mail
 [EMAIL PROTECTED] fi

Malcolm
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rsync does not --exclude: (??)

2006-10-27 Thread Gary Kline
On Sat, Oct 28, 2006 at 06:18:44AM +0930, Malcolm Kay wrote:
 On Sat, 28 Oct 2006 03:15 am, Gary Kline wrote:
  People,
 
  Weeks ago I tried this *without* the --exclude flags and
  overwrote DOT file that I didn't want to.  Iust rechecked
  this use of rsync, saving important files from my work server
  elseswhere, and see that some files or directories are being
  listed and copied over.  IDoes anything obvious jump out here?
 
  gary
 
 
 
  #
  ## test2ethos.sh
  #
 
 rsync -Cptuvaz -n -e ssh -i
  /home/kline/.ssh/tao_XXXYYYZZZ-id \ --exclude
  /home/kline/.zlogin  \
 --exclude /home/kline/.zshrc  \
 --exclude /home/kline/.zhistory.*  \
 
 An ambiguous argument to the --exclude 
 option /home/kline/.zhistory.* will need to be quoted . . .
  --exclude '/home/kline/.zhistory.*' \
 
 otherwise it is expanded by the shell before reaching rsync
 and then only the first referenced file is preceded by --exclude.
 So instead of being excluded the transfer of the rest of the 
 expansion is emphasised. I don't know how rsync will then deal
 with subsequent options.


Hm, I didn't think I saw .ctwm..  Or .mozilla.   Thanks much; 
I'll play around and see.

gary

 
 --exclude /home/kline/.ctwrm  \
 --exclude /home/kline/.mozilla  \
 --exclude /home/kline/.evolution  \
 --exclude /home/kline/4zip/  \
 --exclude '/home/kline/www/'  \
 /home/kline [EMAIL PROTECTED]:/home/kline
 if [ $? =  0 ]
 then
echo rsync transfer went okay: tao to ethos
 else
echo rsync failed to ethos from /home/kline|mail
  [EMAIL PROTECTED] fi
 
 Malcolm
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
Gary Kline  Seattle BSD Users' Group (seabug)  | [EMAIL PROTECTED]
Thought Unlimited Org's Alternate Email Site
http://www.magnesium.net/~kline
   To live is not a necessity; but to live honorably...is a necessity. -Kant

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rsync does not --exclude: (??)

2006-10-27 Thread Lars Kristiansen

Gary Kline skrev:

People,

Weeks ago I tried this *without* the --exclude flags and
overwrote DOT file that I didn't want to.  Iust rechecked this
use of rsync, saving important files from my work server
elseswhere, and see that some files or directories are being
listed and copied over.  IDoes anything obvious jump out here?

gary



#
## test2ethos.sh
#

   rsync -Cptuvaz -n -e ssh -i /home/kline/.ssh/tao_XXXYYYZZZ-id \
   --exclude /home/kline/.zlogin  \
   --exclude /home/kline/.zshrc  \
   --exclude /home/kline/.zhistory.*  \
   --exclude /home/kline/.ctwrm  \
   --exclude /home/kline/.mozilla  \
   --exclude /home/kline/.evolution  \
   --exclude /home/kline/4zip/  \
   --exclude '/home/kline/www/'  \
   /home/kline [EMAIL PROTECTED]:/home/kline


Hope this might help.
From man rsync:
global include/exclude patterns are anchored at the root of the transfer
in man rsync look for: INCLUDE/EXCLUDE PATTERN RULES
and ANCHORING INCLUDE/EXCLUDE PATTERNS

Regards, Lars


   if [ $? =  0 ]
   then
  echo rsync transfer went okay: tao to ethos
   else
  echo rsync failed to ethos from /home/kline|mail [EMAIL PROTECTED]
   fi




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]