From b2b7fae1aa095b51a3aa0dfb7e43b628f5929fc3 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 19 Oct 2023 10:16:43 +0200 Subject: [PATCH] Fix copy paths and use backup directory function --- infrastructure/docker-backup/image/resources/backup.sh | 2 +- infrastructure/docker-backup/image/resources/restore.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure/docker-backup/image/resources/backup.sh b/infrastructure/docker-backup/image/resources/backup.sh index 3b500fe..2b67f4a 100755 --- a/infrastructure/docker-backup/image/resources/backup.sh +++ b/infrastructure/docker-backup/image/resources/backup.sh @@ -9,7 +9,7 @@ function main() { file_env RESTIC_MONTHS_TO_KEEP 12 backup-db-dump - backup-fs-from-directory "/media" + backup-directory "/media" } source /usr/local/lib/functions.sh diff --git a/infrastructure/docker-backup/image/resources/restore.sh b/infrastructure/docker-backup/image/resources/restore.sh index 1cbf65a..83b3a77 100755 --- a/infrastructure/docker-backup/image/resources/restore.sh +++ b/infrastructure/docker-backup/image/resources/restore.sh @@ -14,10 +14,10 @@ function main() { # Restore latest snapshot into /var/backups/restore restore-directory '/var/backups/restore' - cp -r /var/backups/restore /media + cp -r /var/backups/restore/* /media # adjust file permissions for the taiga user - chown -R taiga:taiga /media + chown -R 999:999 /media # Restore db drop-create-db