rubo77 Asked: 2016-07-11 00:20:49 +0800 CST2016-07-11 00:20:49 +0800 CST 2016-07-11 00:20:49 +0800 CST 使用 sync_first 将 rsnapshot 配置为仅每日备份 772 我只想使用sync_first选项在我的服务器中创建每日备份。我如何必须将我的服务器设置为每天备份一次? rsnapshot 1 个回答 Voted Best Answer rubo77 2016-07-11T02:06:51+08:002016-07-11T02:06:51+08:00 在/etc/rsnapshot.conf集合 snapshot_root /backup/rsnapshot/ # ... sync_first 1 并且保留规则仅每天: #retain hourly 6 retain daily 7 还定义仅/etc/cron.d/rsnapshot每天启动 rsync 并添加同步选项: #0 */4 * * * root /usr/bin/rsnapshot hourly 30 4 * * * root /opt/bin/rsnapshot sync && /usr/bin/rsnapshot daily 现在,当使用详细选项调用 rsnapshot 时: rsnapshot -v sync rsnapshot -v daily 你会看到类似的输出 /bin/cp -al /backup/rsnapshot/.sync /backup/rsnapshot/daily.0 mv /backup/rsnapshot/daily.2/ /backup/rsnapshot/daily.3/ mv /backup/rsnapshot/daily.1/ /backup/rsnapshot/daily.2/ mv /backup/rsnapshot/daily.0/ /backup/rsnapshot/daily.1/ /bin/cp -al /backup/rsnapshot/.sync /backup/rsnapshot/daily.0
在
/etc/rsnapshot.conf
集合并且保留规则仅每天:
还定义仅
/etc/cron.d/rsnapshot
每天启动 rsync 并添加同步选项:现在,当使用详细选项调用 rsnapshot 时:
你会看到类似的输出