我正在做每日增量备份和每月完整备份,两者都是口是心非
每日备份脚本(中/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
我的问题是:何时何地使用口是心非验证?在增量或完全或两者之后?
就我个人而言
verify
,每次备份后都会进行备份。根据结果,cron 会发送电子邮件或继续清除旧备份。毕竟备份是关于数据安全的。这是使用duply
条件批处理命令作为 cronjobs 完成的(披露:我是duply
维护者)。建议根据一般备份大小、带宽限制、云存储传输成本或本地 CPU 功率限制等限制因素来确定验证频率。
因为您似乎正在备份到本地硬盘驱动器,所以我认为以上都不是问题,因此尽可能多地进行验证会很便宜。