From 1c29f3c23f96ae9ec662e82faacd759e4fc8d650 Mon Sep 17 00:00:00 2001 From: "d. johnson" Date: Thu, 22 Jan 2015 22:57:10 -0600 Subject: add verify and current files count for reference --- duplicity-backups.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/duplicity-backups.sh b/duplicity-backups.sh index 0488724..9a83807 100755 --- a/duplicity-backups.sh +++ b/duplicity-backups.sh @@ -117,6 +117,7 @@ fi - /proc + /root + ${ROOT_TMPDIR} +- /root/.cache - /run - /sbin + /srv @@ -131,7 +132,11 @@ fi + /var/www EOT -date --rfc-3339=seconds >> /var/log/duplicity.log +# Verify changes, verbosity=4 to see what files changed +/usr/bin/duplicity verify $EXTRA_DUPLICITY -v4 --include-filelist ${TMPDIR}/duplicity-backups.txt $BACKUP_URL / >> /var/log/duplicity.log + +# Run backup +/bin/date --rfc-3339=seconds >> /var/log/duplicity.log /usr/bin/duplicity $EXTRA_DUPLICITY --no-encryption /root/.gnupg $BACKUP_URL/keys /usr/bin/duplicity $EXTRA_DUPLICITY --include-filelist ${TMPDIR}/duplicity-backups.txt / $BACKUP_URL @@ -142,6 +147,18 @@ date --rfc-3339=seconds >> /var/log/duplicity.log /usr/bin/duplicity remove-older-than 1M --force $BACKUP_URL/keys /usr/bin/duplicity remove-older-than 1M --force $BACKUP_URL +# Display the number of files in the backup set +echo "" +echo "Number of current files in backup:" +/usr/bin/duplicity list-current-files $BACKUP_URL | /usr/bin/wc -l +echo "" + +# Reminder on recovery +echo "Use a command like this to recover files from 3 days ago:" +echo "/usr/bin/duplicity -t 3D --file-to-restore some/file/from/backups $BACKUP_URL /recovery/point/file" +echo "" +echo "end report." + # Unsetting the confidential variables so they are gone for sure. unset PASSPHRASE /bin/rm $TMPDIR/duplicity-backups.txt -- cgit