mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2024-11-01 08:31:45 +01:00
Merge pull request #7 from sevenval/add_missing_gunzip_to_restore
Adds missing gunzip command
This commit is contained in:
commit
3f47ebf87c
1 changed files with 2 additions and 1 deletions
3
restore.sh
Normal file → Executable file
3
restore.sh
Normal file → Executable 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
|
||||
|
|
Loading…
Reference in a new issue