From 6643761eff5c38e80352a00f5ec8f0b13defa5cc Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 30 Apr 2024 14:54:27 +0200 Subject: [PATCH] fix backup label --- compose.mariadb.yml | 1 + compose.postgres.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/compose.mariadb.yml b/compose.mariadb.yml index 2c20754..4fc83f2 100644 --- a/compose.mariadb.yml +++ b/compose.mariadb.yml @@ -11,6 +11,7 @@ services: image: "mariadb:10.11.2" deploy: labels: + backupbot.backup: "true" backupbot.backup.pre-hook: 'mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" gitea > /var/lib/mysql/backup.sql' backupbot.backup.post-hook: "rm -rf /var/lib/mysql/backup.sql" backupbot.backup.path: "/var/lib/mysql/backup.sql" diff --git a/compose.postgres.yml b/compose.postgres.yml index fcda6ac..9ce67e9 100644 --- a/compose.postgres.yml +++ b/compose.postgres.yml @@ -11,6 +11,7 @@ services: image: postgres:15.3 deploy: labels: + backupbot.backup: "true" backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql" backupbot.backup.post-hook: "rm -r /var/lib/postgresql/data/backup.sql" backupbot.backup.path: "/var/lib/postgresql/data"