我正在进行每日增量备份和每月完整备份,两者都是口是心非的
每日备份脚本(中/etc/cron.daily/
)
#!/bin/sh
adddate() {
while IFS= read -r line; do
printf '%s %s\n' "$(date):" "$line";
done
}
# be sure external drives are mounted
mount -a
# backup to HDD backup B, using duplicity
echo "\n\nBacking up /home and /etc into /mnt/backupB with duplicity (incremental backup)" | adddate >> /var/log/daily-backup.log 2>&1
export PASSPHRASE=****
duplicity --exclude='**/.cache/' --include /home --include /etc --exclude '**' / file:///mnt/backupB | adddate >> /var/log/daily-backup.log 2>&1
unset PASSPHRASE
每月备份脚本(中/etc/cron.monthly/
)
#!/bin/sh
adddate() {
while IFS= read -r line; do
printf '%s %s\n' "$(date):" "$line";
done
}
# be sure external drives are mounted
mount -a
# backup to HDD backup B, using duplicity
echo "\n\nBacking up /home and /etc into /mnt/backupB with duplicity (full backup)" | adddate >> /var/log/monthly-backup.log 2>&1
export PASSPHRASE=*****
duplicity full --exclude='**/.cache/' --include /home --include /etc --exclude '**' / file:///mnt/backupB | adddate >> /var/log/monthly-backup.log 2>&1
unset PASSPHRASE
我的问题是:何时何地应使用口是心非验证?增量后或全部后或两者兼而有之?
答案1
我个人verify
在每次备份后都会进行备份。根据结果,cron 会发送一封电子邮件或继续清除旧备份。毕竟备份关系到数据安全。这是使用duply
条件批处理命令作为 cronjobs 来完成的(披露:我是duply
维护者)。
建议根据一般备份大小、带宽限制、云存储传输成本或本地 CPU 功率限制等限制因素来确定验证频率。
由于您似乎正在备份到本地硬盘驱动器,因此我认为上述情况都不重要,因此尽可能频繁地进行验证会很便宜。