Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Jun 18, 2024
1 parent 87c4ffc commit 456a080
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/makefile/db-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ echo "#!/bin/bash" > pg_restore.sh

for DB in $DB_NAMES; do
cat >> pg_restore.sh << EOF
until pg_isready; do
until pg_isready -h ${G3WSUITE_POSTGRES_HOST} -p ${G3WSUITE_POSTGRES_PORT} -d template1; do
echo "wait 30s until is ready"
sleep 30;
done
sleep 5;
psql ${DB_LOGIN} -d template1 -c "DROP DATABASE IF EXISTS ${DB}_1634;"
psql ${DB_LOGIN} -d template1 -c "create database ${DB}_1634;"
pg_restore ${DB_LOGIN} -d ${DB}_1634 /var/lib/postgresql/backup/${ID}/${DB}.bck
Expand Down

0 comments on commit 456a080

Please sign in to comment.