Add mount service to backup

This commit is contained in:
Tobias Reisinger 2024-01-06 20:56:47 +01:00
parent 24d93ecad6
commit 03ccb49229
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 18 additions and 30 deletions

View file

@ -1,30 +0,0 @@
version: "3.7"
services:
backup:
build:
context: .
image: backup
restart: never
env_file:
- service.env
volumes:
- /tmp/backup-misc:/backup/misc
- gitea_data:/backup/volumes/gitea_data
- influxdb_data:/backup/volumes/influxdb_data
- reitanlage_data:/backup/volumes/reitanlage_data
- synapse_media_store:/backup/volumes/synapse_media_store
- tandoor_mediafiles:/backup/volumes/tandoor_mediafiles
command: restic backup /backup
volumes:
gitea_data:
external: true
influxdb_data:
external: true
reitanlage_data:
external: true
synapse_media_store:
external: true
tandoor_mediafiles:
external: true

View file

@ -28,4 +28,22 @@ backup_compose:
- --retry-lock=1m
restart: never
hostname: "{{ ansible_facts.hostname }}"
mount:
build:
context: .
image: backup
restart: never
hostname: "{{ ansible_facts.hostname }}"
env_file:
- service.env
entrypoint:
- /usr/bin/restic
- --retry-lock=1m
command:
- mount
- /mnt
privileged: true
devices:
- /dev/fuse
volumes: "{{ host_backup.volumes | map_backup_volumes }}"