标签:sersync
主要还是讲rsync的实践
上机实验
还有写一些脚本
下面是自动备份的脚本
#bak site and logs
cd /var/html && tar zcf /backup/www_$(date +%F).tar.gz ./www
cd /app && tar zcf /backup/logs_$(date +%F).tar.gz ./logs
#bak sys conf
cd / && tar zcf /backup/etc_$(date +%F).tar.gz ./scripts
/bin/cp /var/spool/cron/root /backup/
#rsync data to bakserver
rsync -avzp /backup/ rsync backup@10.0.0.8::backup/ --password-file=/etc/
rsync.password
#del data 7 days ago
find /backup -type f -name "*.tar.gz" -mtime +7|xargs rm -f
以上脚本都还是未完成版本
20170721L08-02-02老男孩Linux运维实战培训初级第八节课课前【上机实战】考试讲解
标签:sersync
原文地址:http://398528.blog.51cto.com/388528/1949839