From f22ca7a7f0445f22bb00e4af1c7d0965833ede21 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sun, 19 May 2024 13:40:52 +0200 Subject: [PATCH] Revert "WIP autorestic" This reverts commit 0e523a9edcc5b3dced3073791b86b192eb640525. --- Makefile | 4 +--- config/backup/autorestic.yml | 13 ------------- docker-compose.backup.yml | 9 ++++----- env/backup.env | 9 ++++++++- 4 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 config/backup/autorestic.yml diff --git a/Makefile b/Makefile index 9009e77..70afbdf 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,9 @@ DOCKER := docker -PROFILES := backup +PROFILES := caddy wordpress adminer backup qbittorrent syncthing gitea gitea-runner uptime-kuma jellyfin watchtower PROFILE_CMD := $(addprefix --profile ,$(PROFILES)) -# caddy syncthing gitea gitea-runner uptime-kuma jellyfin watchtower adminer wordpress qbittorrent - COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') .PHONY: build all diff --git a/config/backup/autorestic.yml b/config/backup/autorestic.yml deleted file mode 100644 index b42f789..0000000 --- a/config/backup/autorestic.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -locations: - caddy_data: - from: /data/caddy_data - to: - - foo - cron: '* * * * *' - -backends: - foo: - type: local - path: /backup \ No newline at end of file diff --git a/docker-compose.backup.yml b/docker-compose.backup.yml index cd2b11b..e4039db 100644 --- a/docker-compose.backup.yml +++ b/docker-compose.backup.yml @@ -1,18 +1,15 @@ services: # Backup backup: - image: cupcakearmy/autorestic:latest + image: mazzolino/restic:latest container_name: backup profiles: - backup restart: on-failure:5 env_file: - env/backup.env - #entrypoint: ["autorestic", "backup", "--ci", "-va", "-c", "/data/autorestic.yml"] - entrypoint: ["restic init --repository-version 2 --repo", "/data/caddy_data"] volumes: - - backup:/backup - - ./config/backup/autorestic.yml:/data/autorestic.yml:ro + - backup:/mnt/restic - caddy_data:/data/caddy_data:ro - caddy_config:/data/caddy_config:ro # - gitea_data:/data/gitea_data:ro @@ -25,6 +22,8 @@ services: # - qbittorrent_config:/data/qbittorrent_config:ro # - qbittorrent_data:/data/qbittorrent_data:ro # - uptimekuma_data:/data/uptimekuma_data:ro + networks: + - infra-network security_opt: - no-new-privileges:true diff --git a/env/backup.env b/env/backup.env index 3e5879a..138647a 100644 --- a/env/backup.env +++ b/env/backup.env @@ -1 +1,8 @@ -AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 +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% \ No newline at end of file