Solved

Where Does mysqldump Gets Its Information To Perform Backups

Posted on 2015-02-19
5
143 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
  • 3
  • 2
5 Comments
 
LVL 82

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 82

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 82

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
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…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now