> thomas graichen <[EMAIL PROTECTED]> wrote:
> > Martin Pool <[EMAIL PROTECTED]> wrote:
> > > On 31 May 2001, thomas graichen <[EMAIL PROTECTED]> wrote:
> > >> did anyone here get rsync tunneled through ssh working so far?
> 


Yes, I use it daily for automatic updates to three webservers using 
ssh to tunnel through a socks firewall with the following bash script
Hope this helps

Michael

WEBTARGETS="[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]"

##### actual update command  #####
Rsync () {

  SRCDIR=$1
  SOURCE=$2
  DEST=$3

  pushd $SRCDIR 2>&1 1> /dev/null

# use rsync to move local files to remote host(s)
/usr/local/bin/rsync -az --exclude=*~ --exclude=.* --delete --force \ 
       --rsync-path=/usr/local/bin/rsync -e "/usr/local/bin/ssh -x" \ 
       $SOURCE $DEST 1> /dev/null 2>&1  popd 1> /dev/null 2>&1
}    

UpdateArchives () {
  Rsync /usr/local/webarchives "*" \
        ${TARGET}:public_html/webarchives
}

# update the remote archives
for TARGET in $WEBTARGETS; do 
UpdateArchives
done

Reply via email to