From: Guillaume Pellerin Date: Mon, 18 Feb 2019 15:39:04 +0000 (+0100) Subject: Drop DB on restore X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a4f83843eefe4e33764b2bcac1b24b93bd745c9d;p=docker-django-scripts.git Drop DB on restore --- diff --git a/dev/local/restore_db.sh b/dev/local/restore_db.sh index 4c1aaf1..c61b65f 100755 --- a/dev/local/restore_db.sh +++ b/dev/local/restore_db.sh @@ -11,7 +11,7 @@ if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then gunzip < /srv/backup/mariadb.dump.gz | mysql -h db $MYSQL_DATABASE -uroot -p$MYSQL_ROOT_PASSWORD elif [ ! -z "$POSTGRES_PASSWORD" ]; then export PGPASSWORD=$POSTGRES_PASSWORD - pg_restore -c -hdb -Upostgres -dpostgres /srv/backup/postgres.dump + pg_restore -c -C -hdb -Upostgres -dpostgres /srv/backup/postgres.dump fi echo "Restore done!"