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>

1 Comments.