Compressing mysqldump output – mysql, gzip, bzip2 and LZMA (7z)
Do a mysql dump and compress directly with gzip
mysqldump < mysqldump options> | gzip > outputfile.sql.gz
Gunzip and import using gzip
gunzip < outputfile.sql.gz | mysql < mysql options>
Do a mysql dump and compress directly with bzip2
mysqldump < mysqldump options> | bzip2 > outputfile.sql.bz2
Bunzip2 and import using bzip2
bunzip2 < outputfile.sql.bz2 | mysql < mysql options>
Do a mysql dump and compress directly with lzma
mysqldump < mysqldump options> | lzma > outputfile.sql.lzma
Unlzma and import using unlzma
unlzma < outputfile.sql.lzma | mysql < mysql options>
Related posts:
- Optimize MySQL for Low Memory Use
- Howto: How to Reset the MySQL Root Password
- Optimize MySQL Performance With MySQLTuner
- Sun acquires MySQL
- MySQL 5.0 Release Candidate
- MySQL Optimization and Performance Tips
- MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
- MySQL: Remove Duplicate Entries
- MySQL Concatenate: Adding String At The End Of Field Data
- MySQL Performance Monitoring and Optimization Tools
