[Wolves] rsync info

Re-LoaD reload at brum2600.net
Tue Apr 17 15:12:01 BST 2007


baz wrote:
> Hi, can anyone point me in the right direction here? What I want to do
> is synchronise a directory on my server with one on my laptop, so the
> one on my server always has an up to date copy (a kind of backup if you
> like).
> 
> I've been playing around with rsync on my local box but without any
> luck. The server is on my network at 192.168.1.60 and my local box ip
> address is 192.168.1.9
> 
> Any advise or help very welcome.
> 
> Baz

 From my own lib:- use abuse modify as you need :)

reload at Orac:~/SCRIPTS$ more bratsync.ver1.sh
#!/bin/ksh

export SSH=/usr/bin/ssh
export RSYNC_PATH=/usr/bin/rsync
export SETTINGS="--verbose --delete --hard-links --delete-excluded 
--stats --compress --archive $EXCLUDE"
export SOURCE_HOST=source_server <- change
export TARGET_HOST=target_server <- change
export SOURCE_USER=rooted <- user with shared key
export TARGET_USER=rooted <- user with shared key
export SOURCE_DIR=/home/stuff/
export TARGET_DIR=/home/box1/stuff
COMMAND='/usr/bin/rsync $SETTINGS --rsh="$SSH" 
--rsync-path="$RSYNC_PATH" ${SOURCE_USER}@${SOURCE_HOST}:${SOURCE_DIR} 
${TARGET_DIR}'
LOG=./bratsync_box1.log
cp $LOG ${LOG}.bak
  >$LOG
# Quick DNS test
nslookup $SOURCE_HOST  | tee -a $LOG
nslookup $TARGET_HOST  | tee -a $LOG
################################################################
         date  | tee -a $LOG
         eval echo $COMMAND  | tee -a $LOG
         eval $COMMAND 2>&1 | tee -a $LOG
         date | tee -a $LOG
##########################################
##########################################


Hope this helps

Re-LoaD



More information about the Wolves mailing list