From: Guillaume Pellerin Date: Tue, 25 Feb 2020 16:01:56 +0000 (+0100) Subject: [db] fix host for restoring X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3ecbc8246c22270d120a00134b13c2836f21378e;p=docker-django-scripts.git [db] fix host for restoring --- diff --git a/dev/local/restore_db.sh b/dev/local/restore_db.sh index 5530959..5392fd3 100755 --- a/dev/local/restore_db.sh +++ b/dev/local/restore_db.sh @@ -8,7 +8,7 @@ echo "Restoring..." # import database functions of type if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then - gunzip < /srv/backup/mariadb.dump.gz | mysql -h localhost $MYSQL_DATABASE -uroot -p$MYSQL_ROOT_PASSWORD + 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 -C -hdb -Upostgres -dpostgres /srv/backup/postgres.dump