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.

Web Projects Consulting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.