I'm making daily incremental backups and monthly full backups, both with duplicity
Daily backup script (in /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
Monthly backup script (in /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
My question is: when and where shall I use duplicity verify? After incremental or full or both?
verify
only checks the self-integrity of files within the backup. You need--compare-data
to compare with the source, see here. To improve confidence perhaps consider alternating each month between 2 backup discs, and manually trying to restore an old random file a few times a year.--compare-data
is quite useless when your data changes after the backup was taken.verify
restores the last backup's content (when run w/o--time
parameter) file by file locally and will make sure that the backup is restorable, else it will throw an error.