6
###########################
# SNAPSHOT ROOT DIRECTORY #
###########################

# All snapshots will be stored under this root directory.
#
snapshot_root   /.snapshots/


###############################
### BACKUP POINTS / SCRIPTS ###
###############################

# LOCALHOST
# 1st dir to backup
backup  /home/username/some_dir/to_backup/  localhost/
# 2nd dir to backup
backup  /home/username/another_dir/to_backup/   localhost/
#backup /foo/bar/   localhost/  one_fs=1, rsync_short_args=-urltvpog
#backup_script  /usr/local/bin/backup_pgsql.sh  localhost/postgres/

现在有了这些设置,所有备份都将.snapshots在我的根目录下的 dir 中有目的地,保持层次结构。

所以我会有:

/.snapshots/localhost/home/username/some_dir/to_backup

是否有可能以某种方式让它2nd dir to backup有另一个目的地,例如 my /home/username/backup-scripts

4

2 回答 2

13

使用另一个名称复制现有的 .confsudo cp /etc/rsnapshot.conf /etc/rsnapshot-2ndname.conf 并使用特定于该目录进行一些更改

sudo nano /etc/rsnapshot-2ndname.conf

保存并运行第二个 .conf 文件,sudo rsnapshot -c /etc/rsnapshot-2ndname.conf configtest如果你得到语法 ok ,然后使用命令sudo rsnapshot -c /etc/rsnapshot-2ndname.conf -t hourly为第二个目录配置 cronjobs 进行空运行,sudo nano /etc/cron.d/rsnapshot你可以在其中已经存在的行下方添加一组行,

30 */4 * * * root /usr/bin/rsnapshot -c /etc/rsnapshot-2ndname.conf hourly 
01 1 * * * root /usr/bin/rsnapshot -c /etc/rsnapshot-2ndname.conf daily 
01 2 * * 0 root /usr/bin/rsnapshot -c /etc/rsnapshot-2ndname.conf weekly
01 5 1 * * root /usr/bin/rsnapshot -c /etc/rsnapshot-2ndname.conf monthly
01 8 1 1 * root /usr/bin/rsnapshot -c /etc/rsnapshot-2ndname.conf yearly 
于 2015-02-24T12:30:52.460 回答
4

不是没有创建另一个配置,snapshot_root然后运行它rsnapshot -c new.conf

于 2014-12-18T16:38:45.130 回答