Last active
September 2, 2015 03:50
-
-
Save noma4i/450c52ef275d7400bcc2 to your computer and use it in GitHub Desktop.
Quick snippet to Copy MySQL database from remote host with Progress Bar pipe
This file contains hidden or 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
# Transfer MySQL Database dump | |
mysqldump -u USER_NAME -h REMOTE_HOST --password=USER_PASWORD --compress --databases DATABASE_NAME | pv | gzip -c > DATABASE_NAME.sql.gz | |
# Rollout dump to local MySQL | |
gunzip -c DATABASE_NAME.sql.gz | mysql -u root -p DATABASE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment