mirror of
https://github.com/garraflavatra/docker-volume-s3-backup.git
synced 2025-05-17 13:14:38 +00:00
fix restore for case where restored tables are missing in target
This commit is contained in:
parent
31f3a471bc
commit
d6a761045e
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eu
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "$S3_ACCESS_KEY_ID" ]; then
|
||||
@ -90,7 +90,7 @@ fi
|
||||
conn_opts="-h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER -d $POSTGRES_DATABASE"
|
||||
|
||||
echo "Restoring from backup..."
|
||||
pg_restore $conn_opts --single-transaction --clean db.dump
|
||||
pg_restore $conn_opts --clean --if-exists db.dump
|
||||
rm db.dump
|
||||
|
||||
echo "Restore complete."
|
||||
|
Loading…
x
Reference in New Issue
Block a user