mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 00:34:26 +01:00
Add restic backup
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
29e3988bca
commit
a141daff08
4
Makefile
4
Makefile
@ -13,9 +13,11 @@
|
||||
|
||||
DOCKER := docker
|
||||
|
||||
PROFILES := caddy wordpress adminer uptime-kuma qbittorrent jellyfin watchtower backup syncthing openssh gitea gitea-runner
|
||||
PROFILES := caddy wordpress adminer backup qbittorrent
|
||||
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
||||
|
||||
# syncthing openssh gitea gitea-runner uptime-kuma jellyfin watchtower
|
||||
|
||||
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')
|
||||
|
||||
.PHONY: build all
|
||||
|
@ -1,7 +1,7 @@
|
||||
services:
|
||||
# Backup
|
||||
backup:
|
||||
image: offen/docker-volume-backup:latest
|
||||
image: mazzolino/restic:latest
|
||||
container_name: backup
|
||||
profiles:
|
||||
- backup
|
||||
@ -9,20 +9,19 @@ services:
|
||||
env_file:
|
||||
- env/backup.env
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- backup:/archive
|
||||
- caddy_data:/backup/caddy_data:ro
|
||||
- caddy_config:/backup/caddy_config:ro
|
||||
# - gitea_data:/backup/gitea_data:ro
|
||||
# - gitea_config:/backup/gitea_config:ro
|
||||
# - wordpress_db:/backup/wordpress_db:ro
|
||||
# - wordpress:/backup/wordpress:ro
|
||||
# - jellyfin_config:/backup/jellyfin_config:ro
|
||||
# - jellyfin_data:/backup/jellyfin_data:ro
|
||||
# - jellyfin_cache:/backup/jellyfin_cache:ro
|
||||
# - qbittorrent_config:/backup/qbittorrent_config:ro
|
||||
# - qbittorrent_data:/backup/qbittorrent_data:ro
|
||||
# - uptimekuma_data:/backup/uptimekuma_data:ro
|
||||
- backup:/mnt/restic
|
||||
- caddy_data:/data/caddy_data:ro
|
||||
# - caddy_config:/data/caddy_config:ro
|
||||
# - gitea_data:/data/gitea_data:ro
|
||||
# - gitea_config:/data/gitea_config:ro
|
||||
# - wordpress_db:/data/wordpress_db:ro
|
||||
# - wordpress:/data/wordpress:ro
|
||||
# - jellyfin_config:/data/jellyfin_config:ro
|
||||
# - jellyfin_data:/data/jellyfin_data:ro
|
||||
# - jellyfin_cache:/data/jellyfin_cache:ro
|
||||
# - qbittorrent_config:/data/qbittorrent_config:ro
|
||||
# - qbittorrent_data:/data/qbittorrent_data:ro
|
||||
# - uptimekuma_data:/data/uptimekuma_data:ro
|
||||
networks:
|
||||
- infra-network
|
||||
security_opt:
|
||||
|
@ -1,5 +1,3 @@
|
||||
version: '3.9'
|
||||
|
||||
networks:
|
||||
infra-network:
|
||||
driver: bridge
|
||||
|
@ -1,5 +1,3 @@
|
||||
version: '3.9'
|
||||
|
||||
volumes:
|
||||
uptimekuma_data:
|
||||
name: uptimekuma_data
|
||||
|
12
env/backup.env
vendored
12
env/backup.env
vendored
@ -1,4 +1,8 @@
|
||||
BACKUP_COMPRESSION="zst"
|
||||
BACKUP_CRON_EXPRESSION="0 2 * * *"
|
||||
# BACKUP_RETENTION_DAYS: '7'
|
||||
# BACKUP_FILENAME="backup-%Y-%m-%dT%H-%M-%S.{{ .Extension }}"
|
||||
BACKUP_CRON=0 2 * * *
|
||||
RESTIC_REPOSITORY=/mnt/restic
|
||||
RESTIC_BACKUP_SOURCES=/data
|
||||
RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
||||
#RESTIC_BACKUP_ARGS=
|
||||
#RESTIC_FORGET_ARGS=--prune --keep-last 14 --keep-daily 1
|
||||
#RESTIC_PRUNE_ARGS=
|
||||
RESTIC_CHECK_ARGS=--read-data-subset=20%
|
Loading…
Reference in New Issue
Block a user