mysqldump question

Posted on 2011-09-27
Last Modified: 2012-08-13
I have a question about mysqldump.  

I currently run a mysqldump script on my databases daily. One database is very large with blob data and the backup takes quite a while. During the backup we are still able to search update and insert into this database which is necessary at all times.

My question is.. Will mysqldump backup/dump data that is updated or inserted into tables after the mysqldump process is started?

If it does i would be concerned that a restore from the dump would be incomplete.

Say I have 5 tables. MysqlDump starts dumping and completes the first two tables and starts backing up the third table which is large and takes a while. In the mean time my application is still running and users are inserting and updating data which affects the first two tables that have already been dumped as well as the third which is still being dumped as well as the fouth and fifth table which haven't been dumped yet. This would make for an incomplete record for my application if table three, four and five dumps include the new data but tables one and two don't...
Question by:Ben720
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Accepted Solution

johanntagle earned 250 total points
ID: 36714168
mysqldump by default only locks the current table being backed up, so yes, you are likely going to get tables inconsistent from each other.  Using --databases or --all-databases option will lock and dump all tables a database at a time, which will enable a consistent state, but then you won't be able to do inserts.

Since you put MS OS as one of the zones for this question, I assume your database is on a Windows server, so no option for LVM snapshots.  Suggest you configure replication, then do the backup on the slave while replication is temporarily turned off.

There's also Percona Xtrabackup that does hot backup, but the Windows version is still in Alpha.  See

Author Comment

ID: 36719872
Was afraid of that. After some more googleing for backing up the database with out taking it offline I came across "MySQL Enterprise Backup" . It seems to have the ability to do a complete backup while the database is still online (selects/updates/inserts/ect..) then updates the backed up data with any changes made during the backup. Going to run some testing with it, I'll post back the results...
LVL 24

Assisted Solution

johanntagle earned 250 total points
ID: 36720433
Oh yes forgot about that because I don't use it (I believe it's $5000/server?).  Anyway, it's what's Percona Xtrabackup is positioned against - see

Assisted Solution

rwwff earned 125 total points
ID: 36812923
Replication can be a little intimidating to setup the first time, but its really not so bad; and once you have a replication server running, you can do any ole horrible thing to it that you might want without impacting the working server.

LVL 21

Assisted Solution

by:K V
K V earned 125 total points
ID: 36813167
I'd rather suggest to setup a slave and take a backup from there.
If you are using Innodb "--single-transaction" will help in taking the consistent snapshot.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question