diff --git a/templates/backup.yaml.j2 b/templates/backup.yaml.j2 index d704d0298627c04615c50effedda496e5510266d..32a557b380c83ab783f98639df496dcb38ec324f 100644 --- a/templates/backup.yaml.j2 +++ b/templates/backup.yaml.j2 @@ -5,7 +5,7 @@ services: context: . dockerfile: Dockerfile-mysql image: filament/duplicity:mysql - hostname: backup-framadate + hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-framadate environment: DST: "swift://framadate_{{ inventory_hostname|lower }}" MYSQL_DATABASE: "{{ date_db_user }}" @@ -23,9 +23,12 @@ 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" networks: - framadate_default - public + volumes: + - date_backup_cache:/root/.cache/duplicity/ command: - /etc/periodic/daily/jobrunner @@ -35,3 +38,6 @@ networks: public: driver_opts: encrypted: 1 + +volumes: + date_backup_cache: diff --git a/templates/backup2.yaml.j2 b/templates/backup2.yaml.j2 index 0d67efc41bc8631d86994519e4874d92aca9d614..df531ec677a769b99a2deba6f700a9f22d856f20 100644 --- a/templates/backup2.yaml.j2 +++ b/templates/backup2.yaml.j2 @@ -5,7 +5,7 @@ services: context: . dockerfile: Dockerfile-mysql image: filament/duplicity:mysql - hostname: backup-framadate + hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-framadate environment: DST: "swift://framadate_{{ inventory_hostname|lower }}" MYSQL_DATABASE: "{{ date_db_user }}" @@ -23,9 +23,12 @@ 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" networks: - framadate_default - public + volumes: + - date_backup2_cache:/root/.cache/duplicity/ command: - /etc/periodic/daily/jobrunner @@ -35,3 +38,6 @@ networks: public: driver_opts: encrypted: 1 + +volumes: + date_backup2_cache: