diff --git a/templates/backup.yaml.j2 b/templates/backup.yaml.j2 index 6a298448f821106f25c084bd40a000751be20d86..b48beb5553b9a6d529b84d2e9118d201a2e5c6c7 100644 --- a/templates/backup.yaml.j2 +++ b/templates/backup.yaml.j2 @@ -2,7 +2,7 @@ version: "2.1" services: backup_privatebin: image: tecnativa/duplicity:postgres - hostname: backup-privatebin + hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-privatebin environment: DST: "swift://privatebin_{{ inventory_hostname|lower }}" PGDATABASE: "none" @@ -20,11 +20,14 @@ services: JOB_300_WHAT: "backup --full-if-older-than 6D" JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@" JOB_302_WHEN: "daily" + OPTIONS: "--allow-source-mismatch" volumes: + - privatebin_backup_cache:/root/.cache/duplicity/ - privatebin_data:/mnt/backup/src/privatebin:z command: - /etc/periodic/daily/jobrunner volumes: + privatebin_backup_cache: privatebin_data: external: true diff --git a/templates/backup2.yaml.j2 b/templates/backup2.yaml.j2 index 2039764b95d20aa7dfd5f6894820297cb5577962..82ca5ae470e9dc4a240a95a66e62a19b54f95034 100644 --- a/templates/backup2.yaml.j2 +++ b/templates/backup2.yaml.j2 @@ -2,7 +2,7 @@ version: "2.1" services: backup_privatebin: image: tecnativa/duplicity:postgres - hostname: backup-privatebin + hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-privatebin environment: DST: "swift://privatebin_{{ inventory_hostname|lower }}" PGDATABASE: "none" @@ -20,11 +20,14 @@ services: JOB_300_WHAT: "backup --full-if-older-than 6D" JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@" JOB_302_WHEN: "daily" + OPTIONS: "--allow-source-mismatch" volumes: + - privatebin_backup2_cache:/root/.cache/duplicity/ - privatebin_data:/mnt/backup/src/privatebin:z command: - /etc/periodic/daily/jobrunner volumes: + privatebin_backup2_cache: privatebin_data: external: true