You want everything in wex into wex on the remote.  Gotcha.
Let's take a simple case.
wex contains a b c d e.
"/usr/local/bin/rsync -rsh=/usr/bin/rsh -r --delete --perms --owner 
--group /mail/spool/imap/user/wex/* 
[EMAIL PROTECTED]:/mail/spool/imap/user/wex" on the commandline becomes 
"/usr/local/bin/rsync -rsh=/usr/bin/rsh -r --delete --perms --owner 
--group /mail/spool/imap/user/wex/a /mail/spool/imap/user/wex/b 
/mail/spool/imap/user/wex/c /mail/spool/imap/user/wex/d 
/mail/spool/imap/user/wex/e 
[EMAIL PROTECTED]:/mail/spool/imap/user/wex".  The parameter ending in 
"*" is replaced by as many entries as there are in the directory, which 
can be quite a loth, and is your problem.  rsync is perfectly happy to 
handle freaking enormous numbers of files, but it has to find out about 
them.
Unless there's some valid reason why you want to avoid applying 
perms,owner,group to the wex directory itself, "/usr/local/bin/rsync 
-rsh=/usr/bin/rsh -r --delete --perms --owner --group 
/mail/spool/imap/user/wex/. 
[EMAIL PROTECTED]:/mail/spool/imap/user/wex/." will work nicely, or 
perhaps "/usr/local/bin/rsync -rsh=/usr/bin/rsh -r --delete --perms 
--owner --group /mail/spool/imap/user/wex 
[EMAIL PROTECTED]:/mail/spool/imap/user".  These will let rsync build 
the filelist itself, avoiding problems (and plain old inefficiencies) of 
argument passing.
Speaking of inefficiencies, unless you want to avoid maintaining symlinks 
devices (not likely to be there anyway) and times, you can improve 
readability by changing your commandline to "/usr/local/bin/rsync 
-rsh=/usr/bin/rsh -a --delete /mail/spool/imap/user/wex/. 
[EMAIL PROTECTED]:/mail/spool/imap/user/wex/."  Letting it keep times 
synced lets it use them to optimize future syncs by not checksumming files 
that match in name/timestamp/size.  "-a" is a lot faster to type than 
"--owner --group --perms --times --links --recursive --devices"

Tim Conway
Unix System Administration
Contractor - IBM Global Services
desk:3032734776
[EMAIL PROTECTED]



I get this error when I try to copy a directory with a lot of files: 
"bash: /usr/local/bin/rsync: Argument list too long"

The exact command is: "/usr/local/bin/rsync -rsh=/usr/bin/rsh -r 
--delete --perms --owner --group /mail/spool/imap/user/wex/* 
[EMAIL PROTECTED]:/mail/spool/imap/user/wex".

BUT, if I try tris command it works: "/usr/local/bin/rsync 
-rsh=/usr/bin/rsh -r --delete --perms --owner --group 
/mail/spool/imap/user/* [EMAIL PROTECTED]:/mail/spool/imap/user/wex".


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to