Skip to content

Instantly share code, notes, and snippets.

@boh717
Forked from jakeasmith/mysqldump.sh
Last active October 18, 2018 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boh717/e5bf9d558128b66a17a7a0983213062b to your computer and use it in GitHub Desktop.
Save boh717/e5bf9d558128b66a17a7a0983213062b to your computer and use it in GitHub Desktop.
A quick snippet for doing a compressed mysql dump with a pv to monitor progress
# Add -h <host> -u <user> -p if needed
mysqldump --single-transaction --skip-lock-tables database [table1 table2 table3] | pv -W | gzip -c > [filename].sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment