Backup and Restore MySQL Database

Simple commands. To backup (with root password): mysqldump -u root -p --all-databases | gzip > /backups/mybackup.gz To restore: zcat mybackup.gz | mysql -u root -p