This commit is contained in:
Emmanuel Viennet 2021-08-19 23:44:11 +02:00
parent bb75fef1f6
commit ccbb021f50

View File

@ -88,11 +88,15 @@ for f in "$SRC"/SCO*.dump
do
echo "Loading postgres database from $f"
pg_restore --create -d SCODOC --no-owner "$f"
if [ ! "$?" -eq 0 ]
then
printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting."
exit 1
fi
# le pg_restore a parfois des erreurs sans gravités...
# voir https://www.postgresql.org/message-id/20849.1541638465%40sss.pgh.pa.us
# donc on ne peut pas se fier au code de retour.
# Demander aux utilisateurs de vérifier eux meêm que les bases sont OK
# if [ ! "$?" -eq 0 ]
# then
# printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting."
# exit 1
# fi
done
#