Bxl-rpi borg backup

This commit is contained in:
Brieuc Dubois 2023-04-11 00:44:41 +02:00 committed by Bhasher
parent a3749775c5
commit e6746777dd
2 changed files with 25 additions and 2 deletions

View File

@ -0,0 +1 @@
0 2 * * * root docker start borg

View File

@ -1,5 +1,3 @@
version: '3.7'
services: services:
traefik: traefik:
container_name: traefik container_name: traefik
@ -349,3 +347,27 @@ services:
- "traefik.http.routers.baikal.tls.certresolver=http" - "traefik.http.routers.baikal.tls.certresolver=http"
- "traefik.http.routers.baikal.entrypoints=internalsecure,externalsecure" - "traefik.http.routers.baikal.entrypoints=internalsecure,externalsecure"
borg:
container_name: borg
image: pschiffe/borg
volumes:
- /mnt/borg:/borg/repo
- $DATA/borg/config:/root
- $DATA:/borg/data/docker-data:ro
- /etc/localtime:/etc/localtime:ro
environment:
- BORG_REPO=/borg/repo
- BORG_PASSPHRASE=${BORG_PASSPHRASE}
- BACKUP_DIRS=/borg/data
- COMPRESSION=lz4
- PRUNE=1
restart: 'no'
cron:
container_name: cron-scheduling
image: alpine:latest
volumes:
- ./config/cron:/etc/cron.d:ro
- /etc/localtime:/etc/localtime:ro
command: crond -f
restart: unless-stopped