From 9c56d902c241d67ecbb7f49c52606b7578c578b7 Mon Sep 17 00:00:00 2001 From: jem Date: Sun, 20 Dec 2020 13:55:17 +0100 Subject: [PATCH] try to init restic --- infrastrucure/docker/image/resources/restore.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastrucure/docker/image/resources/restore.sh b/infrastrucure/docker/image/resources/restore.sh index 511320a..7425aff 100755 --- a/infrastrucure/docker/image/resources/restore.sh +++ b/infrastrucure/docker/image/resources/restore.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -o pipefail +set -Eeo pipefail function main() { @@ -22,6 +22,9 @@ function main() { psql -d template1 -h ${POSTGRES_SERVICE} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} \ --no-password -c "CREATE DATABASE \"${POSTGRES_DB}\";" + # init restic + restic -v -r ${RESTIC_REPOSITORY}/pg-role snapshots + # restore roles restic -r ${RESTIC_REPOSITORY}/pg-role dump latest stdin | \ psql -d template1 -h ${POSTGRES_SERVICE} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} \