aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-06 11:01:17 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-06 11:01:17 -0200
commit55dfc08aaa67f87cbb5401f0e67a51dca1b413c4 (patch)
tree8bccef3201591636eed4669233b9faf550fc97dd /templates
parent24b2ddc15afd304bee4431226c04050b81001e23 (diff)
downloadpuppet-backup-55dfc08aaa67f87cbb5401f0e67a51dca1b413c4.tar.gz
puppet-backup-55dfc08aaa67f87cbb5401f0e67a51dca1b413c4.tar.bz2
Adding remove_all_but_n_full for dup action; excluding /root/.cache from backups
Diffstat (limited to 'templates')
-rw-r--r--templates/dup.conf.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/dup.conf.erb b/templates/dup.conf.erb
index ee58d2f..631bf9d 100644
--- a/templates/dup.conf.erb
+++ b/templates/dup.conf.erb
@@ -10,6 +10,7 @@
BACKUP_FOLDER="<%= directory %>"
FULL_IF_OLDER_THAN="<%= full_if_older_than %>"
REMOVE_OLDER_THAN="<%= remove_older_than %>"
+REMOVE_ALL_BUT_N_FULL="<%= remove_all_but_n_full %>"
ENCRYPT_KEY="<%= encryptkey %>"
SIGN_KEY="<%= encryptkey %>"
<% backup_exclude_unencrypted.each do |del| -%>
@@ -41,6 +42,8 @@ else
fi
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."