git备份
1.目的:
备份git的上的源码
2.IP:
源服务器: 192.168.0.46 目的服务器 192.168.1.251
3.定时任务:
crond定时任务crontab -e 查看(两台服务器都有定时任务) 脚本路径:/server/scripts (两台服务器都有脚本)
4.配置开机启动:
192.168.0.46 tail -n1 /etc/rc.local /usr/bin/rsync --daemon
5.图片
59 23 * * * /bin/bash /server/scripts/delbackup.sh root@ubuntu16:/server/scripts# cat delbackup.sh #!/bin/bash find /backup/ -type f -mtime +7 -name "*.tar.gz" |xargs rm -f root@ubuntu16:/server/scripts#
本文出自 “砖家博客” 博客,请务必保留此出处http://wsxxsl.blog.51cto.com/9085838/1852862
原文地址:http://wsxxsl.blog.51cto.com/9085838/1852862