Merge pull request #7 from sevenval/add_missing_gunzip_to_restore

Adds missing gunzip command
This commit is contained in:
Fco. Javier Delgado del Hoyo 2017-09-11 09:44:12 +02:00 committed by GitHub
commit 3f47ebf87c

3
restore.sh Normal file → Executable file
View file

@ -8,7 +8,8 @@ then
fi
echo "=> Restore database from $1"
if mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" < "$1"
set -o pipefail
if gunzip --stdout "$1" | mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS"
then
echo "=> Restore succeeded"
else