Skip to content
Snippets Groups Projects
Commit cb2be37c authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

[IMP] add cache and update hostname

parent 51b6ebc2
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ version: "2.1" ...@@ -2,7 +2,7 @@ version: "2.1"
services: services:
backup_privatebin: backup_privatebin:
image: tecnativa/duplicity:postgres image: tecnativa/duplicity:postgres
hostname: backup-privatebin hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-privatebin
environment: environment:
DST: "swift://privatebin_{{ inventory_hostname|lower }}" DST: "swift://privatebin_{{ inventory_hostname|lower }}"
PGDATABASE: "none" PGDATABASE: "none"
...@@ -20,11 +20,14 @@ services: ...@@ -20,11 +20,14 @@ services:
JOB_300_WHAT: "backup --full-if-older-than 6D" JOB_300_WHAT: "backup --full-if-older-than 6D"
JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@" JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@"
JOB_302_WHEN: "daily" JOB_302_WHEN: "daily"
OPTIONS: "--allow-source-mismatch"
volumes: volumes:
- privatebin_backup_cache:/root/.cache/duplicity/
- privatebin_data:/mnt/backup/src/privatebin:z - privatebin_data:/mnt/backup/src/privatebin:z
command: command:
- /etc/periodic/daily/jobrunner - /etc/periodic/daily/jobrunner
volumes: volumes:
privatebin_backup_cache:
privatebin_data: privatebin_data:
external: true external: true
...@@ -2,7 +2,7 @@ version: "2.1" ...@@ -2,7 +2,7 @@ version: "2.1"
services: services:
backup_privatebin: backup_privatebin:
image: tecnativa/duplicity:postgres image: tecnativa/duplicity:postgres
hostname: backup-privatebin hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-privatebin
environment: environment:
DST: "swift://privatebin_{{ inventory_hostname|lower }}" DST: "swift://privatebin_{{ inventory_hostname|lower }}"
PGDATABASE: "none" PGDATABASE: "none"
...@@ -20,11 +20,14 @@ services: ...@@ -20,11 +20,14 @@ services:
JOB_300_WHAT: "backup --full-if-older-than 6D" JOB_300_WHAT: "backup --full-if-older-than 6D"
JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@" JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@"
JOB_302_WHEN: "daily" JOB_302_WHEN: "daily"
OPTIONS: "--allow-source-mismatch"
volumes: volumes:
- privatebin_backup2_cache:/root/.cache/duplicity/
- privatebin_data:/mnt/backup/src/privatebin:z - privatebin_data:/mnt/backup/src/privatebin:z
command: command:
- /etc/periodic/daily/jobrunner - /etc/periodic/daily/jobrunner
volumes: volumes:
privatebin_backup2_cache:
privatebin_data: privatebin_data:
external: true external: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment