From e0fcd1da3aae1f784315a1e8715addca50da6ebc Mon Sep 17 00:00:00 2001 From: jem Date: Sat, 12 Dec 2020 18:17:38 +0100 Subject: [PATCH] restore target / is errorprone --- infrastrucure/docker/image/resources/backup.sh | 2 +- infrastrucure/docker/image/resources/restore.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastrucure/docker/image/resources/backup.sh b/infrastrucure/docker/image/resources/backup.sh index 691565f..51eed52 100755 --- a/infrastrucure/docker/image/resources/backup.sh +++ b/infrastrucure/docker/image/resources/backup.sh @@ -19,7 +19,7 @@ function main() { restic -r ${RESTIC_REPOSITORY}/db backup --stdin # backup nextcloud filesystem - restic -r ${RESTIC_REPOSITORY}/files backup /var/backups/ + cd /var/backups/ && restic -r ${RESTIC_REPOSITORY}/files backup . } source /usr/local/lib/functions.sh diff --git a/infrastrucure/docker/image/resources/restore.sh b/infrastrucure/docker/image/resources/restore.sh index 6cd1143..04efdc7 100755 --- a/infrastrucure/docker/image/resources/restore.sh +++ b/infrastrucure/docker/image/resources/restore.sh @@ -13,7 +13,7 @@ function main() { # files rm -rf /var/backups/* - restic -r $RESTIC_REPOSITORY/files restore latest --target /var/backups/ + restic -r $RESTIC_REPOSITORY/files restore latest --target /var/backup/ # db psql -d template1 -h ${POSTGRES_SERVICE} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} \