Backup MySQL

From GWAVA Technologies Training
Revision as of 17:50, 9 January 2015 by Danielc (Talk | contribs)

Jump to: navigation, search

This article is a very bare bones "dummy's guide" set of information. If you'd like to learn more check out the MySQL page on using MySQL dump: http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html Or this article on database backup methods if you'd like to look into other options. Plus there's a whole world of internet to search.

Contents

MySQL dump

The mysqldump program bundled with MySQL is one of the best ways that has been found to backup a MySQL database.

For Retain you'll want to use the --single-transaction and possibly the --quick switch Check out the MySQL documentation on those switches here.

Using the --quick switch may depend on the size of your database, the bigger it is the more important it may become to use it for your dump script.

Examples

Linux

At the command line type

Server:/ # mysqldump --single-transaction --quick retain > retain.date.sql -u root -p

Explanation of the command:

mysqldump The command to get started telling MySQL you want to make a dump file

--single-transaction and --quick: switches you want to apply, read up on it in the documentation mentioned above if you'd like to fiddle with it some more. There's a lot you can tweak.

retain: This part is the database you want to export/dump

>(export to pointer, I.E. direction you're pushing the data) retain.date.sql (this can be

Windows

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox