Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Where Does mysqldump Gets Its Information To Perform Backups

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
willie0-360
Asked:
willie0-360
  • 3
  • 2
2 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
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
 
willie0-360Author Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
willie0-360Author Commented:
Thanks Dave.  This is what I was looking.
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
0

Featured Post

Technology Partners: 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!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now