How to backup and restore MySQL with compression

Backup:

$ mysqldump  [dbname] | gzip [-9] > backupfile.sql.gz

Restore:

gunzip < [backupfile.sql.gz] | mysql  [dbname]


Comments

Popular posts from this blog

How to get Active Transactions and Locks from MySQL

Example of a PAC file