summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord. johnson <fenris02@fedoraproject.org>2015-01-22 22:57:10 -0600
committerd. johnson <fenris02@fedoraproject.org>2015-01-22 22:57:10 -0600
commit1c29f3c23f96ae9ec662e82faacd759e4fc8d650 (patch)
tree16ad7abd9bd5e9d9b1cb1bbd26ddc70f34417b1e
parent291c2bfa5c86f1f1b3cc81f68dd7588d3084d6fe (diff)
downloadcleanup-1c29f3c23f96ae9ec662e82faacd759e4fc8d650.tar.gz
cleanup-1c29f3c23f96ae9ec662e82faacd759e4fc8d650.tar.xz
cleanup-1c29f3c23f96ae9ec662e82faacd759e4fc8d650.zip
add verify and current files count for reference
-rwxr-xr-xduplicity-backups.sh19
1 files changed, 18 insertions, 1 deletions
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