Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco)
2006-Jan-27 01:00 UTC
How to rsync PULL multiple files/dirs
Hi all, I am wondering how do I pull data from a remote host without running a daemon. PUSH command I would like the below statement be turned into a PULL from remote host instead. /usr/bin/rsync -e ssh --archive --sparse --compress --update --verbose --stats --progress --exclude=cdersync.tar.gz --exclude=*.bz2 --exclude=*.jpg --exclude=*.mp3 --exclude=ZDE --exclude=*.rpm --exclude=*.sit /users/jona/cde /users/jona/Desktop /users/jona/.bashrc /users/jona/.profile cdeprd:/users/jona/ I thought of something like this... /usr/bin/rsync -e ssh --archive --sparse --compress --update --verbose --stats --progress --dry-run --exclude=cdersync.tar.gz --exclude=*.bz2 --exclude=*.jpg --exclude=*.mp3 --exclude=ZDE --exclude=*.rpm --exclude=*.sit --include=/users/jona/cde --include=/users/jona/Desktop --include=/users/jona/.bashrc --include=/users/jona/.profile jona@cdeprd: /users/jona But that does not work the way I would like it to work. Thanks! -Jonathan
On Thu, Jan 26, 2006 at 04:59:04PM -0800, Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco) wrote:> I would like the below statement be turned into a PULL from remote host > [...] /users/jona/cde /users/jona/Desktop > /users/jona/.bashrc /users/jona/.profile cdeprd:/users/jona/The "ADVANCED USAGE" section of the rsync manpage explains how to specify multiple source items from a remote rsync. For instance: rsync [OPTIONS] jona@cdeprd:'cde Desktop .bashrc .profile' /users/jona ..wayne..
Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco)
2006-Jan-28 02:11 UTC
How to rsync PULL multiple files/dirs
Thanks! Now I have a different problem but related to rsync pull. Currently I can't figure out what is wrong with my bash script or don't see the error. Hopefully the information below is enough. When I echo the command it looks like below... /usr/bin/rsync -e ssh --archive --sparse --compress --update --dry-run --exclude=cdersync.tar.gz --exclude=*.bz2 --exclude=*.jpg --exclude=*.mp3 --exclude=ZDE --exclude=*.rpm --exclude=*.sit jona@cdeprd:' /users/jona/cde /users/jona/Desktop /users/jona/.bashrc /users/jona/.profile' /users/jona/ Just pasting via terminal it works great. But executing with "bash -x" the below lines... #grouping together RSYNC_CMD="${RSYNC_CMD} ${RSYNC_ARGS} $RSYNC_DEST_HOST${RSYNC_FILES}" #excuting ${RSYNC_CMD} #bash debug result + /usr/bin/rsync -e ssh --archive --sparse --compress --update --dry-run --exclude=cdersync.tar.gz '--exclude=*.bz2' '--exclude=*.jpg' '--exclude=*.mp3' --exclude=ZDE '--exclude=*.rpm' '--exclude=*.sit' 'jona@cdeprd:'\''' /users/jona/cde /users/jona/Desktop /users/jona/.bashrc '/users/jona/.profile'\''' /users/jona/ Would return "rsync error: syntax or usage error (code 1) at main.c(836)" Any idea what I did wrong?> -----Original Message----- > From: Wayne Davison [mailto:wayned@samba.org] > Sent: Thursday, January 26, 2006 5:11 PM > To: Jonathan Chen -X (jonachen - The Armada Group, Inc. at Cisco) > Cc: rsync@lists.samba.org > Subject: Re: How to rsync PULL multiple files/dirs > > On Thu, Jan 26, 2006 at 04:59:04PM -0800, Jonathan Chen -X > (jonachen - The Armada Group, Inc. at Cisco) wrote: > > I would like the below statement be turned into a PULL from remote > > host [...] /users/jona/cde /users/jona/Desktop /users/jona/.bashrc > > /users/jona/.profile cdeprd:/users/jona/ > > The "ADVANCED USAGE" section of the rsync manpage explains > how to specify multiple source items from a remote rsync. > For instance: > > rsync [OPTIONS] jona@cdeprd:'cde Desktop .bashrc .profile' /users/jona > > ..wayne.. >