Last active
October 9, 2017 13:04
-
-
Save kaznovac/db3350cf54f671c3616de5bafd684262 to your computer and use it in GitHub Desktop.
import gzipped sql to mysql with progress tracking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SQL_DATA=database_data.sql.gz | |
if [ -f "${SQL_DATA}" ]; then | |
echo "Importing data: ${SQL_DATA}" | |
pv ${SQL_DATA} | gunzip | mysql -u root -p schema | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment