From 7cc3de4e33a9d17c5a52d38adae3bff9b09c4d54 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Jan 2012 14:44:43 -0200 Subject: Excluding $backupdir/restore from backups; adding short mode for rsync and rdiff checks --- manifests/init.pp | 2 +- templates/rdiff-check.sh.erb | 2 +- templates/rsync-check.sh.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 016e1cc..767a7b4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -26,7 +26,7 @@ $backupdir_remote = "$backupdir/remote" # for data that's going to be encrypted and signed $backup_include_unencrypted = [ "/etc", "/var", "/home", ] -$backup_exclude_unencrypted = [ "$backupdir_remote", "$backupdir/duplicity", "/var/cache", "/var/log", "/var/vservers", "/var/chroot", "/root/.cache" ] +$backup_exclude_unencrypted = [ "$backupdir_remote", "$backupdir/duplicity", "$backupdir/restore", "/var/cache", "/var/log", "/var/vservers", "/var/chroot", "/root/.cache" ] # for data that were previously encrypted and signed $backup_include_encrypted = [ "$backupdir/duplicity", ] diff --git a/templates/rdiff-check.sh.erb b/templates/rdiff-check.sh.erb index a2052ff..947370c 100644 --- a/templates/rdiff-check.sh.erb +++ b/templates/rdiff-check.sh.erb @@ -17,7 +17,7 @@ if [ -e "$BACKUP_FOLDER" ]; then rdiff-backup --list-increment-sizes $set; - if [ -d "$set/<%= backupdir %>/duplicity" ]; then + if [ -d "$set/<%= backupdir %>/duplicity" ] && [ "$1" != "--short" ]; then echo " " echo "Checking duplicity backup found at $set/<%= backupdir %>/duplicity..." echo "======================================================" diff --git a/templates/rsync-check.sh.erb b/templates/rsync-check.sh.erb index 07eb42d..a33606d 100644 --- a/templates/rsync-check.sh.erb +++ b/templates/rsync-check.sh.erb @@ -38,7 +38,7 @@ if [ -e "$BACKUP_FOLDER" ]; then fi # Check duplicity metadata - if [ -d "$set/<%= backupdir %>/duplicity" ]; then + if [ -d "$set/<%= backupdir %>/duplicity" ] && [ "$1" != "--short" ]; then for duplicity in `ls -1 $set/<%= backupdir %>/duplicity | grep -v metadata | xargs`; do echo " " echo "Checking duplicity backup found at $set/<%= backupdir %>/duplicity/$duplicity..." -- cgit v1.2.3