mysqldump is a tool that allows you to perform logical backups for your MySQL databases. The output of mysqldump is a SQL file that can be used later to restore one or more databases.

How to compress a mysqldump backup using Gzip?

Gzip can be used togheter with mysqldump in order to compress the size of the output. It has 9 leveles of compression, 6 being the default one.

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


#mysql #mysqldump #backend #database #optimization #cli #sql #coding

How to Сompress a mysqldump Backup Using Gzip
1.95 GEEK