diff options
author | drebs <drebs@riseup.net> | 2012-01-06 12:25:09 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2012-01-06 12:25:09 -0200 |
commit | 38ce615625c5acfc5ae1d5dae0e3a7fbd8e6d698 (patch) | |
tree | c576fe797032bef829adc0f958042f55edb4b5b5 /templates | |
parent | 7cc3de4e33a9d17c5a52d38adae3bff9b09c4d54 (diff) | |
download | puppet-backup-38ce615625c5acfc5ae1d5dae0e3a7fbd8e6d698.tar.gz puppet-backup-38ce615625c5acfc5ae1d5dae0e3a7fbd8e6d698.tar.bz2 |
changing duplicity cleanup to occur before the actual backup
Diffstat (limited to 'templates')
-rw-r--r-- | templates/dup.conf.erb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/dup.conf.erb b/templates/dup.conf.erb index 631bf9d..ea5dccf 100644 --- a/templates/dup.conf.erb +++ b/templates/dup.conf.erb @@ -31,6 +31,8 @@ mkdir -p $BACKUP_FOLDER if [ "$1" == "--check" ]; then duplicity collection-status file:///$BACKUP_FOLDER else + # cleanup any previous broken backups + duplicity cleanup file:///$BACKUP_FOLDER --force # it's important to let $EXCLUDE come before $INCLUDE to # have greater precedence; see duplicity(1) for more info duplicity -v6 --full-if-older-than $FULL_IF_OLDER_THAN \ @@ -43,7 +45,6 @@ else duplicity remove-older-than $REMOVE_OLDER_THAN file:///$BACKUP_FOLDER --force || exit 1 duplicity remove-all-but-n-full $REMOVE_ALL_BUT_N_FULL file:///$BACKUP_FOLDER --force || exit 1 - duplicity cleanup file:///$BACKUP_FOLDER --force || exit 1 if [ "$?" != "0" ]; then fatal "Removal of old backups failed." |