# 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" ]
+$backup_exclude_unencrypted = [ "$backupdir_remote", "$backupdir/duplicity", "/var/cache", "/var/log", "/var/vservers", "/var/chroot", "/root/.cache" ]
# for data that were previously encrypted and signed
$backup_include_encrypted = [ "$backupdir/duplicity", ]
$ensure = present,
$full_if_older_than = "1M",
$remove_older_than = "45D",
+ $remove_all_but_n_full = "1",
$periodic_check = absent,
$directory = "${backupdir}/duplicity") {
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| -%>
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."