MySQL Compress Backup

Home » MySql » MySQL Compress Backup
December 3, 2015 MySql No Comments
          There are several strategies for backup, snapshot, dump, dump binlog, it all depends on your need and the size of your database. I’ll explain a little about the tool provides by MySQL, which is the

mysqldump

        , I indicate this tool for databases that have 15gb/20gb even more than that, the probability that you have problems to restore a backup and long delay, make it unfeasible.How mysqldump works? He does nothing but create sql commands to our structure and data and put them in the file specified.First, I will explain some of the most important options mysqldump then, for those who have MySQL installed on a Linux server, I will teach how to compress the dump in real-time.

all databases

one database

many databases

triggers

procedures and functions

      :

 

    Now let’s compress our dump in real time with

gzip:

    We can still reach a higher compression ratio using the

bzip2:

And how do I restore the dump?

Normal:

gzip:

bzip2:

 

LEAVE A COMMENT