From bcec823b46133c833b95c0ec3fdb6a73384ab92a Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Tue, 20 Aug 2024 20:11:03 +0200 Subject: [PATCH] Improve backup for wordpress Signed-off-by: Bensuperpc --- Makefile | 4 ++-- docker-compose.wordpress.yml | 2 ++ env/backup.env | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8257974..0a3efce 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ DOCKER := docker -PROFILES := caddy wordpress adminer syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea +PROFILES := caddy wordpress adminer syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea watchtower PROFILE_CMD := $(addprefix --profile ,$(PROFILES)) -# gitea-runner watchtower transmission +# gitea-runner transmission COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') diff --git a/docker-compose.wordpress.yml b/docker-compose.wordpress.yml index f65b724..f2f5444 100644 --- a/docker-compose.wordpress.yml +++ b/docker-compose.wordpress.yml @@ -44,6 +44,8 @@ services: container_name: wordpress_backup profiles: - wordpress + depends_on: + - wordpress restart: on-failure:5 env_file: - env/backup.env diff --git a/env/backup.env b/env/backup.env index d1131f2..b92c9ec 100644 --- a/env/backup.env +++ b/env/backup.env @@ -1,9 +1,9 @@ #RUN_ON_STARTUP=true -BACKUP_CRON=0 * * * * +BACKUP_CRON=*/30 * * * * RESTIC_REPOSITORY=/mnt/restic RESTIC_BACKUP_SOURCES=/data RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ RESTIC_BACKUP_ARGS=--tag docker-volumes --verbose -RESTIC_FORGET_ARGS=--prune --keep-last 14 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 2 +RESTIC_FORGET_ARGS=--prune --keep-last 8 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 4 #RESTIC_PRUNE_ARGS= RESTIC_CHECK_ARGS=--read-data-subset=20% \ No newline at end of file