[[email protected] ~]# vim /etc/rsyncd.passwd
在文件中添加密码为123456
[[email protected] ~]# chmod 600 /etc/rsyncd.passwd
添加脚本rsync-mysql.sh
[[email protected] ~]# # cat /home/script-shell/rsync-mysql.sh
rsync -avz /home/mysqlbak [email protected]:: databack --password-file=/etc/rsyncd.passwd
[[email protected] ~]# sh /home/script-shell/rsync-mysql.sh
[[email protected] Mysql ~]# crontab -l
15 14 * sh /home/script-shell/rsync-mysql.sh
原文地址:http://blog.51cto.com/980696/2144022
时间: 2024-10-01 22:48:08