Web Projects Consulting

Quick Backup of MySQL Database

One-line shortcut to dump to a compressed file:

mysqldump --opt -u[name] -p my_db | gzip -9 > my_db.sql.gz

Dump with stored procedures

mysqldump -u[name] -p --routines [--no-data] [database] | sed -e "s/;;/\$\$/g" > procedures.sql
Tagged on: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.