Advanced

How To Back Up MySQL Databases Without Interrupting MySQL

Posted by falko on · 1 comment
HowtoForge; By Falko Timme
Mail this story
Print this story

This article describes how you can back up MySQL databases without interrupting the MySQL service. Normally, when you want to create a MySQL backup, you either have to stop MySQL or issue a read lock on your MySQL tables in order to get a correct backup; if you do not do it this way, you can end up with an inconsistent backup. To get consistent backups without interrupting MySQL, I use a little trick: I replicate my MySQL database to a second MySQL server, and on the second MySQL server I use a cron job that creates regular backups of the replicated database.

This article describes how you can back up MySQL databases without interrupting the MySQL service. Normally, when you want to create a MySQL backup, you either have to stop MySQL or issue a read lock on your MySQL tables in order to get a correct backup; if you do not do it this way, you can end up with an inconsistent backup. To get consistent backups without interrupting MySQL, I use a little trick: I replicate my MySQL database to a second MySQL server, and on the second MySQL server I use a cron job that creates regular backups of the replicated database.

http://www.howtoforge.com/back_up_mysql_dbs_without_interruptions

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: MySQL

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (1)

Not everyone has the option or hardware capabilities to setup a slave MySQL database for every running instance they may have in a production or any type of environment.

I currently work in an environment where we have close to 90 production MySQL databases. Due to constraints, it would be a large overhead to run an additional 90 slave databases for each.

However I agree that critical systems should have a slave database, another option to use if you need to setup backups without interrupting would be to use something like MySQL ZRM, which enables incremental backups along with full backups, etc.

http://www.zmanda.com/backup-mysql.html

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post