Simple backup a MySQL database and compress it with gzip?

This simple query will allow you to backup a MySQL database while compressing it with GZip.

$ mysqldump -u  -h  -p  | gzip -9 > backup.sql.gz

Advertisement

Did you like it?

No comments yet.

Leave a Comment