2012年1月2日星期一

采用rsync的服务器文件的手工远程备份脚本

#!/bin/bash                                                                                                                            

DATE=`date +%Y-%m-%d_%H`
DEST=./$DATE
RSYNC="rsync -avr root@server:"

mkdir -p $DEST/db $DEST/storage $DEST/cache $DEST/setting $DEST/synclist

$RSYNC/root/rhodecode.db $DEST/db
$RSYNC/sonic/rhodecode --exclude="/rhodecode/*-mirror/*" $DEST/storage
$RSYNC/root/data $DEST/cache
$RSYNC/root/production.ini $DEST/setting
$RSYNC/root/syncrepo.sh $DEST/synclist

没有评论:

发表评论