Web Projects Outsourcing

Quick Backup of MySQL Database

One-line shortcut to dump to a compressed file:

[sourcecode lang=”plain”]
mysqldump –opt -u[name] -p my_db | gzip -9 > my_db.sql.gz
[/sourcecode]

Dump with stored procedures

[sourcecode lang=”plain”]
mysqldump -u[name] -p –routines [–no-data] [database] | sed -e "s/;;/\$\$/g" > procedures.sql
[/sourcecode]

Tagged on: , , ,

Leave a Reply

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

19 + 4 =