visit
Let's assume we have a database named
my_app
for which we want to create a dump and compress it using gzip (default level of compression). We can achieve it with the following command:mysqldump my_app | gzip > my_app_backup.sql.gz
Let's assume we want to backup the same
my_app
database, but this time with a compression level of 8. We can do it with the following command:mysqldump my_app | gzip -8 > my_app_backup.sql.gz
mysqldump has a lot of flags & functions. Check out to find out what else you can do with mysqldump.
Previously published at