At 11:42 AM 7/6/2005 -0500, you wrote:
Robert Citek wrote:
How can I rsync two folders on a remote site to my local machine?
You're better off using a script file to run the process (a la 2-way sync),
.. something like (if you want to run as a normal user, let me know - there
is a 'fix' that for on OmniWiki):
#!/bin/sh
# Destination host machine name
DEST="rsyn.omnitec.net"
USER="root"
LOCALDIR="/web/"
REMOTEDIR="/web/"
LOGFILE="/var/log/rsync"
# Copies and does no display at all.
OPTS="--archive --update --rsh=ssh -vv --password-file=/root/pw"
# May be needed if run by cron?
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
# Pass 1 - get any remote updates
echo "==> Starting rsync GET " $(date) >> ${LOGFILE}
rsync $OPTS $LOCALDIR [EMAIL PROTECTED]:$REMOTEDIR >> ${LOGFILE} 2>$1
# Pass 2 - put any locate updates
echo "==> Starting rsync PUT " $(date) >> ${LOGFILE}
rsync $OPTS [EMAIL PROTECTED]:$REMOTEDIR $LOCALDIR >> ${LOGFILE} 2>&1
echo "==> Completed rsync " $(date) >> ${LOGFILE}
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/