Last Updated: February 25, 2016
· elboletaire

mysqldump | gzip, best combo

Manage gzipped mysql dumps, without the need to extract them.


mysqldump -u username -p your_db_name | gzip -9 > your_db_name.sql.gz


zcat your_db_name.sql.gz | mysql -u username -p your_db_name

3 Responses
Add your response

Add --opt --routines and your DUMP will be the best.

over 1 year ago ·

This is also nice, if you have many databases and to support backup rotations:

over 1 year ago ·

You may also use --triggers but it's a user decission to use options or not.

over 1 year ago ·