Files
home_server/restic/docker-compose.yml
T
2024-02-03 11:58:42 +01:00

79 lines
2.1 KiB
YAML

version: "3.3"
services:
backup:
image: mazzolino/restic
container_name: restic
hostname: null_machine
environment:
RUN_ON_STARTUP: "true"
BACKUP_CRON: "0 */12 * * *"
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: hQ94gkU8DY6BomsUh8LMGHMSRPUNn9dmNJwxnZgW5dkoFZkMZ
RESTIC_BACKUP_SOURCES: /mnt/volumes
RESTIC_COMPRESSION: auto
RESTIC_BACKUP_ARGS: >-
--tag restic-null-machine
--verbose
RESTIC_FORGET_ARGS: >-
--keep-last 10
--keep-daily 7
--keep-weekly 5
--keep-monthly 12
TZ: Europe/Copenhagen
volumes:
- where_to_backup:/restic
- where_to_restore:/tmp-for-restore
- /srv/nextcloud:/mnt/volumes/nextcloud:ro
- /srv/gitlab:/mnt/volumes/gitlab:ro
- /srv/plex:/mnt/volumes/plex:ro
- /srv/pseudotv:/mnt/volumes/pseudotv:ro
- /srv/znc:/mnt/volumes/znc:ro
- /srv/bitbot:/mnt/volumes/bitbot:ro
- /srv/syncthing:/mnt/volumes/syncthing:ro
security_opt:
- no-new-privileges:true
prune:
image: mazzolino/restic
container_name: restic-prune
hostname: null_machine
environment:
RUN_ON_STARTUP: "true"
PRUNE_CRON: "0 0 4 * * *"
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: hQ94gkU8DY6BomsUh8LMGHMSRPUNn9dmNJwxnZgW5dkoFZkMZ
TZ: Europe/Copenhagen
security_opt:
- no-new-privileges:true
check:
image: mazzolino/restic
container_name: restic-check
hostname: null_machine
environment:
RUN_ON_STARTUP: "true"
CHECK_CRON: "0 15 5 * * *"
RESTIC_CHECK_ARGS: >-
--read-data-subset=10%
RESTIC_REPOSITORY: /restic
RESTIC_PASSWORD: hQ94gkU8DY6BomsUh8LMGHMSRPUNn9dmNJwxnZgW5dkoFZkMZ
TZ: Europe/Copenhagen
security_opt:
- no-new-privileges:true
volumes:
where_to_backup:
driver: local
driver_opts:
type: none
device: /home/null/shares/disk2/backup/restic_backup
o: bind
where_to_restore:
driver: local
driver_opts:
type: none
device: /home/null/shares/disk2/backup/restic_restore
o: bind