From 95c36b64933dc00176ab8f781ce09ac0bcb19212 Mon Sep 17 00:00:00 2001 From: "Markus \"Shorty\" Uckelmann" Date: Thu, 7 Sep 2017 17:18:55 +0200 Subject: [PATCH] Adds missing gunzip command This commit adds a gunzip command which extracts the gzip'd SQL dump and pipes it into the mysql command. Without the restore fails. --- restore.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 restore.sh diff --git a/restore.sh b/restore.sh old mode 100644 new mode 100755 index 9657eba..20561f2 --- a/restore.sh +++ b/restore.sh @@ -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