Skip to content

Instantly share code, notes, and snippets.

@noma4i
Last active September 2, 2015 03:50
Show Gist options
  • Save noma4i/450c52ef275d7400bcc2 to your computer and use it in GitHub Desktop.
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
# 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