Solved

Where Does mysqldump Gets Its Information To Perform Backups

Posted on 2015-02-19
5
149 Views
Last Modified: 2015-02-20
Experts:

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.

Thanks.
Willie
0
Comment
Question by:willie0-360
[X]
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
5 Comments
 
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.  http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

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:  http://dev.mysql.com/doc/refman/5.5/en/innodb-backup.html  Note what it says about copying files only when the server is shutdown.
0
 

Author Comment

by:willie0-360
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?

Thanks.
Willie
0
 
LVL 83

Accepted Solution

by:
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.  http://dev.mysql.com/doc/refman/5.5/en/innodb-buffer-pool.html  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.
0
 

Author Comment

by:willie0-360
ID: 40622441
Thanks Dave.  This is what I was looking.
0
 
LVL 83

Expert Comment

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

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

734 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