日期:2014-05-16 浏览次数:20572 次
[simonsun@tech100 ~]$ vim db_back_local.sh
#!/bin/sh
sudo mount -t cifs -o username=administrator,passwd=pwd //172.16.1.8/DB_Dump /home/simonsun/DB_Dump && sudo rsync -avzP -e 'ssh -p 22' root@www.***.com:/db/backup/position/ /home/simonsun/DB_Dump/local/db/backup/position/ > /home/simonsun/dev/logs/svr/_log_$(date +"%Y-%m-%d-%H%M%S").log
sudo umount -O username=administrator,passwd=pwd? /home/simonsun/DB_Dump