From 581cd72a9a6fd78c44f0d9cbc8b761017d40666c Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Thu, 15 Dec 2022 08:32:38 -0800 Subject: [PATCH] feat: add restore labels for DB service --- compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compose.yml b/compose.yml index d32c3db..36535a0 100644 --- a/compose.yml +++ b/compose.yml @@ -72,8 +72,10 @@ services: labels: backupbot.backup: "true" backupbot.backup.path: "/tmp/dump.sql.gz" - backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz" backupbot.backup.pre-hook: "sh -c 'mysqldump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" wordpress | gzip > /tmp/dump.sql.gz'" + backupbot.backup.post-hook: "rm -f /tmp/dump.sql.gz" + backupbot.restore: "true" + backupbot.restore.post-hook: "sh -c 'mysql -u root -p\"$$(cat /run/secrets/db_root_password)\" wordpress < /tmp/dbdump.sql && rm -f /tmp/dbdump.sql'" networks: backend: