#! /bin/sh SRCHOST=tp310 MYHOST=`hostname` cd /var/Backup # http log rsync -ru rsync://$SRCHOST/Backup/httplog . # other backup files if [ ! -d $SRCHOST ] then mkdir $SRCHOST fi cd $SRCHOST rsync -u rsync://$SRCHOST/Backup/$SRCHOST-*.gz . for file in httpd yamasita do if [ ! -f $SRCHOST-$file.tar.gz ] then echo $SRCHOST-$file.tar.gz not found exit 1 fi rm -fr /home/$file.sv mv /home/$file /home/$file.sv zcat $SRCHOST-$file.tar.gz | (cd /; tar xvpf -) done