Improve backup for wordpress

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2024-08-20 20:11:03 +02:00
parent 572c9bc4bb
commit bcec823b46
3 changed files with 6 additions and 4 deletions

View File

@ -13,10 +13,10 @@
DOCKER := docker 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)) PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
# gitea-runner watchtower transmission # gitea-runner transmission
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')

View File

@ -44,6 +44,8 @@ services:
container_name: wordpress_backup container_name: wordpress_backup
profiles: profiles:
- wordpress - wordpress
depends_on:
- wordpress
restart: on-failure:5 restart: on-failure:5
env_file: env_file:
- env/backup.env - env/backup.env

4
env/backup.env vendored
View File

@ -1,9 +1,9 @@
#RUN_ON_STARTUP=true #RUN_ON_STARTUP=true
BACKUP_CRON=0 * * * * BACKUP_CRON=*/30 * * * *
RESTIC_REPOSITORY=/mnt/restic RESTIC_REPOSITORY=/mnt/restic
RESTIC_BACKUP_SOURCES=/data RESTIC_BACKUP_SOURCES=/data
RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
RESTIC_BACKUP_ARGS=--tag docker-volumes --verbose 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_PRUNE_ARGS=
RESTIC_CHECK_ARGS=--read-data-subset=20% RESTIC_CHECK_ARGS=--read-data-subset=20%