feat: backup labels for mysql

This commit is contained in:
decentral1se 2022-11-16 18:16:25 +01:00
parent 38bdef2fd0
commit ef6ffd9985
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,12 @@ services:
- "mariadb:/var/lib/mysql"
networks:
- internal
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: 'mkdir -p /tmp/backup/ && mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" keycloak > /tmp/backup/backup.sql'
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
networks:
internal: