Where Does mysqldump Gets Its Information To Perform Backups

Posted on 2015-02-19
Last Modified: 2015-02-20

I would like to know where does mysqldump get is information to perform a backup.  

If you replace the ibdata1, ib_logfile0, and ib_logfile1 from a MySQL database, while it is running, and make a backup with mysqldump, you still get all of the data when restoring from that backup.  

That is, there is no data loss when restoring from this backup.  However, if you restart the database, you lose all data up to the time where you replaced the ibdata1, ib_logifle0, and ib_logfiles1.

Question by:willie0-360
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
  • 3
  • 2
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 40620493
mysqldump is just a utility that queries the database like any other program.  It queries the 'mysqld' daemon to get the information.

Your problem with InnoDB files is that there is also a cache of recent activity and it is not always updated to the files you are listing.  Info on InnoDB backups:  Note what it says about copying files only when the server is shutdown.

Author Comment

ID: 40620505
Thanks for your response Dave.  When you say "there is also a cache of recent activity and it is not always updated to the files you are listing."  What cache are you referring to and updated to what files?  Also, does this happens when MySQL is running?

LVL 83

Accepted Solution

Dave Baldwin earned 500 total points
ID: 40620567
The official term is 'buffer pool' and it is Always running when MySQL is running if there are InnoDB databases.  Because of this you can not copy the files when MySQL is running and get completely correct data.  Likewise you can Not swap in new files while it is running.

Author Comment

ID: 40622441
Thanks Dave.  This is what I was looking.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40622467
You're welcome, glad to help.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

756 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