mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-11-09 19:57: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
|
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))
|
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 /')
|
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')
|
||||||
|
|
||||||
.PHONY: build all
|
.PHONY: build all
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
# Backup
|
# Backup
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: mazzolino/restic:latest
|
||||||
container_name: backup
|
container_name: backup
|
||||||
profiles:
|
profiles:
|
||||||
- backup
|
- backup
|
||||||
@ -9,20 +9,19 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- env/backup.env
|
- env/backup.env
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- backup:/mnt/restic
|
||||||
- backup:/archive
|
- caddy_data:/data/caddy_data:ro
|
||||||
- caddy_data:/backup/caddy_data:ro
|
# - caddy_config:/data/caddy_config:ro
|
||||||
- caddy_config:/backup/caddy_config:ro
|
# - gitea_data:/data/gitea_data:ro
|
||||||
# - gitea_data:/backup/gitea_data:ro
|
# - gitea_config:/data/gitea_config:ro
|
||||||
# - gitea_config:/backup/gitea_config:ro
|
# - wordpress_db:/data/wordpress_db:ro
|
||||||
# - wordpress_db:/backup/wordpress_db:ro
|
# - wordpress:/data/wordpress:ro
|
||||||
# - wordpress:/backup/wordpress:ro
|
# - jellyfin_config:/data/jellyfin_config:ro
|
||||||
# - jellyfin_config:/backup/jellyfin_config:ro
|
# - jellyfin_data:/data/jellyfin_data:ro
|
||||||
# - jellyfin_data:/backup/jellyfin_data:ro
|
# - jellyfin_cache:/data/jellyfin_cache:ro
|
||||||
# - jellyfin_cache:/backup/jellyfin_cache:ro
|
# - qbittorrent_config:/data/qbittorrent_config:ro
|
||||||
# - qbittorrent_config:/backup/qbittorrent_config:ro
|
# - qbittorrent_data:/data/qbittorrent_data:ro
|
||||||
# - qbittorrent_data:/backup/qbittorrent_data:ro
|
# - uptimekuma_data:/data/uptimekuma_data:ro
|
||||||
# - uptimekuma_data:/backup/uptimekuma_data:ro
|
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
security_opt:
|
security_opt:
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
version: '3.9'
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
infra-network:
|
infra-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
version: '3.9'
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
uptimekuma_data:
|
uptimekuma_data:
|
||||||
name: uptimekuma_data
|
name: uptimekuma_data
|
||||||
|
12
env/backup.env
vendored
12
env/backup.env
vendored
@ -1,4 +1,8 @@
|
|||||||
BACKUP_COMPRESSION="zst"
|
BACKUP_CRON=0 2 * * *
|
||||||
BACKUP_CRON_EXPRESSION="0 2 * * *"
|
RESTIC_REPOSITORY=/mnt/restic
|
||||||
# BACKUP_RETENTION_DAYS: '7'
|
RESTIC_BACKUP_SOURCES=/data
|
||||||
# BACKUP_FILENAME="backup-%Y-%m-%dT%H-%M-%S.{{ .Extension }}"
|
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