Skip to content

Linux: Mysqldump with compression file result

command:
mysqldump -u[username] -p[password] [databasename] | gzip > [filename].sql.gz

example:
mysqldump -uadmin -padm1n magentos | gzip > db_magentos.sql.gz

another option:
mysqldump < mysqldump options> | bzip2 > outputfile.sql.bz2

Share