#!/bin/bash
#to quick back the files!
#xtao2012.10.8 v0.1
if [ $# -ne 2 ];then
echo "Usage: $0 <source dir> <remote dir> "
echo "See logs in the dir which submited the command!"
echo "e.g., $0 /root/ /tmp/back/, to backup dir "root" to "/tmp/back/""
exit -1
fi
echo "See logs in the dir which submited the command!"
nohup rsync -vrtopgu $1 $2 >&rsync.LOG &
本文介绍了一个使用bash脚本快速备份文件的方法,通过rsync命令实现远程或本地文件同步,确保数据安全。
1139

被折叠的 条评论
为什么被折叠?



