Solved

Where Does mysqldump Gets Its Information To Perform Backups

Posted on 2015-02-19
5
151 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

624 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