Восстановление данных
- 2 ответа
- 0 вопросов
1
Вклад в тег
ESCDIR=$(echo "$DIR" |sed -e "s,\([]\(\).^\*\$\/&[]\),\\\\\1,g")
scp -p $DIR/.lastsync $HOST:$DIR
ssh $HOST find $DIR/$SUBDIR -newer $DIR/.lastsync | sed -e "s/$ESCDIR\///" | \
rsync --exclude-from=- --delete -av $DIR/$SUBDIR $HOST:$DIR
rsync --delete -av $HOST:$DIR/$SUBDIR $DIR
rsync --delete -av $DIR/$SUBDIR $HOST:$DIR
DATE=`date`
echo "$DATE Syncing finished"
echo "====================================================="
echo " "
touch $DIR/.lastsync