rsync failures through ssh tunnels
David.Bear at asu.edu
Thu Mar 9 18:36:57 GMT 2006
I attempted to write a script that would connect to the remote rsync
server and run rsync and then close the connection.
I am finding that sometimes the backgrounded ssh session works -- and
sometimes note. I following the syntax at:
though there is NO middle system.
heres the script with the commands just echoing the commands to the
screen. What I am finding is that even after ssh sets up the tunnels
that rsync sits in a sleep state forever.
Any pointers will be greatly appreciated.
# by db
# date: 20060306
sshoptions="-fN -L $pforward:localhost:$rport "
echo "Connecting to host $rhost"
echo /usr/bin/ssh $sshoptions $sshuser@$rhost
echo "beginning sync operation"
echo /usr/bin/rsync -av rsync://localhost:$pforward/$module $dest
echo "all done rsyncing, now cleaning up backgrounded shell"
echo "Killing backgrounded shell "
echo /bin/kill -9 `/usr/bin/pgrep -lf -u natjohn1 ssh | grep "$sshuser@$rhost" | cut -f1 -d " "`
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
"Beware the IP portfolio, everyone will be suspect of trespassing"
More information about the rsync