rsync定時同步備份

[root@Mysql ~]# vim /etc/rsyncd.passwd
在文件中添加密碼爲123456
[root@Mysql ~]# chmod 600 /etc/rsyncd.passwd
添加腳本rsync-mysql.sh
[root@Mysql ~]# # cat /home/script-shell/rsync-mysql.sh
rsync -avz /home/mysqlbak [email protected]:: databack --password-file=/etc/rsyncd.passwd
[root@Mysql ~]# sh /home/script-shell/rsync-mysql.sh
[root@ Mysql ~]# crontab -l
15 14 * sh /home/script-shell/rsync-mysql.sh

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章