]> git.parisson.com Git - docker-django-scripts.git/commitdiff
Drop DB on restore
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 18 Feb 2019 15:39:04 +0000 (16:39 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 18 Feb 2019 15:39:04 +0000 (16:39 +0100)
dev/local/restore_db.sh

index 4c1aaf197d56b0cf79198c61399464847e6e9c0c..c61b65ff649a87bbc508c3f7922e7f7c5091c064 100755 (executable)
@@ -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!"