Skip to end of metadata
Go to start of metadata

MySQL Backup Warning Running MySQL Instance Detected. MySQL Data Will Be Inconsistent

Symptom


Backups succeed with a WARNING:

AGENT: Please configure MySQL instances in CDP Server AGENT: Running MySQL instance detected. MySQL data will be inconsistent!

Cause


A running MySQL instance (mysqld) was detected on your server and you have no MySQL Instance configured in the CDP Server for it.  Backing up MySQL database files without a MySQL instance added to the CDP Server causes no synchronization of the databases during backup.  Database files restored without a properly configured MySQL instance in the CDP Server may be corrupt or unusable.  MySQL Backups are licensed as a add-on product to CDP Agents.
 

Why the MySQL Add-On Is Important

MySQL is very good at recovering from unclean shutdowns so it will detect on startup that its an unclean shutdown when you recover from an unclean backup and automatically repair your corrupt MyISAM tables.
 
Without our MySQL Add-on you will loose whatever changes were being made to the database at the time of the backup.
Note that the R1Soft MySQL backup process is different from a normal hot backup.
 
MySQL Hot Backup Process (mysqlhotcopy)
1) Lock All tables.
2) Flush all table changes to disk.
3) Copy all raw database files (could take a long time.)
4) Unlock tables.

R1Soft MySQL Hot Backup Process
1) Lock All tables.
2) Flush All tables changes to disk.
3) Snapshot the raw partition using the r1soft near-CDP device driver /dev/backupdriver.
Note: This takes less than a second.
4) Unlock tables.
5) If seed copy all raw MySQL files from point-in-time snapshot of volume/partition. If Not a seed copy only changed blocks from point-in-time snapshot of volume/partition.
 
Note this step can take a long time if you are doing a seed or have a lot of changes to your database like importing a bunch of data. Thats ok since we aren't holding table locks anymore. We also are getting the benefits of a totally consistent copy of MySQL raw table files by reading from the block level point-in-time copy-on-write snapshot that /dev/backupdriver maintains for us.
 
This is significant because your application and queries can continue while the backup is taking place (step 5).
With typical hot backup queries will timeout, web pages will fail to load and systems will be down for the duration of the backup operation. 
 
It is not safe to backup MySQL without lock and flush while its running.  Here is a helpful article that tells you how to get hot backups of MySQL using LVM snapshot. (Note: R1Soft does Not use or Require LVM for MySQL Hot Backups.)  The article emphasizes the importance of a lock and flush during a hot backup. 

Except for the fact that its not near-continuous the process described in this article is very similar concept to the backup process that R1 uses. R1 takes a snapshot of your volume. LVM takes a snapshot of your volume too... you just have to be running LVM where R1 can do it for any storage type... not just LVM.

http://www.mysqlperformanceblog.com/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/
 
Note the author of this informative article has in bold: FLUSH TABLES WITH READ LOCK as the first step before creating the snapshot.
 
Here is another text about it in the MySQL 5 certification study guide about the importance of lock and flush during hot backup of MySQL: http://book.itzero.com/read/others/0508/MySQL.Press.MySQL.5.Certification.Study.Guide.2nd. Edition.Aug.2005.eBook-DDU_html/0672328127/ch32lev1sec3.html

Resolution


If you have licensed the MySQL Add-On Module, configure a MySQL instance for each running MySQL daemon on this Agent.

Related Articles


Page: Agent shows a MySQL Error in the logs about MYHELPER (Archived Knowledge Base 2.0) Labels: mysql, install, cdp_server
Page: MySql Restore Fails With Internal Error db.frm Not Found (Archived Knowledge Base 2.0) Labels: mysql, 2-11-release
Page: An IO Error Occurred While Parsing MySQL XML Document (Archived Knowledge Base 2.0) Labels: mysql, xml
Page: MySQL Agent Errors - dots in table filenames (Archived Knowledge Base 2.0) Labels: mysql
Page: License Upgrade Question (Archived Knowledge Base 2.0) Labels: upgrade, license, add-on, mysql
Page: Configuring MySQL instances running inside Virtuozzo VPS (Archived Knowledge Base 2.0) Labels: mysql, add-on, vps, buagent, h/w, node
Page: Restoring MySQL Fails (Archived Knowledge Base 2.0) Labels: mysql
Page: Failed to Start Database r1backup (Archived Knowledge Base 2.0) Labels: mysql
Page: How Do I Add a New MySQL Instance? (Archived Knowledge Base 2.0) Labels: mysql
Page: MySQL Add-on Locks Up MySQL or Backup Hangs During MySQL (Archived Knowledge Base 2.0) Labels: mysql
Page: MySQL Addon - Why MySQL Backups are Not Safe Without It (Archived Knowledge Base 2.0) Labels: mysql
Page: I Have CDP Server Installed - Can I Order MySQL Agent Add-On? (Archived Knowledge Base 2.0) Labels: mysql, license
Page: Enabling MySQL Add-On (Archived Knowledge Base 2.0) Labels: mysql, license
Page: Not having UTF8 set on older mysql servers no longer stops the backup (Archived Knowledge Base 2.0) Labels: mysql
Page: If MySQL backup fails, task state is set to error (Archived Knowledge Base 2.0) Labels: mysql
Page: Added support for innodb_file_per_table (Archived Knowledge Base 2.0) Labels: mysql
Page: Adding MySql Addon for Virtuozzo MySql Instance (Archived Knowledge Base 2.0) Labels: mysql, virtuozzo
Page: Do I Need Root Password of MySQL Database? (Archived Knowledge Base 2.0) Labels: mysql
Page: Is It Safe To Backup MySQL Without Lock And Flush? (Archived Knowledge Base 2.0) Labels: mysql
Page: Can I Restore MySQL Without Having MySQL Agent Add-on Installed? (Archived Knowledge Base 2.0) Labels: mysql
Page: MySQL - Fix permission errors seen in some environments during InnoDB restore (Archived Knowledge Base 2.0) Labels: mysql
Page: MySQL - Fix timeout error during large InnoDB restore (Archived Knowledge Base 2.0) Labels: mysql
Page: MySQL Backup (Archived Knowledge Base 2.0) Labels: mysql
Page: Recovering a Running MySQL Server (Archived Knowledge Base 2.0) Labels: mysql, restore
Page: MySQL Backup Error In Logs (Archived Knowledge Base 2.0) Labels: mysql, backup_error
Showing first 25 of 27 results
Page: Are CDP Agents Transferable? (Archived Knowledge Base 2.0) Labels: license
Page: License Upgrade Question (Archived Knowledge Base 2.0) Labels: upgrade, license, add-on, mysql
Page: Request Additional Licenses (Archived Knowledge Base 2.0) Labels: license
Page: License Activation Behind a Proxy (Archived Knowledge Base 2.0) Labels: testing, proxy, license
Page: Licenses for Agents on VM (Archived Knowledge Base 2.0) Labels: license, virtual_machine, agent
Page: Do You Offer Trial License Keys? (Archived Knowledge Base 2.0) Labels: license, trial
Page: Activating License Keys And Access To Licensing Server From CDP Server (Ports And Firewalls) (Archived Knowledge Base 2.0) Labels: license, trial
Page: I Have CDP Server Installed - Can I Order MySQL Agent Add-On? (Archived Knowledge Base 2.0) Labels: mysql, license
Page: Enabling MySQL Add-On (Archived Knowledge Base 2.0) Labels: mysql, license
Page: License for Disabled Agent (Archived Knowledge Base 2.0) Labels: license, disk_safe
Page: License Key Warnings — Invalid Feature (0xECEBE6EF) (Archived Knowledge Base 2.0) Labels: license, 2-9-release, 2-11-release, 1-51-release
Page: MySQL Backup Warning Running MySQL Instance Detected. MySQL Data Will Be Inconsistent (Archived Knowledge Base 2.0) Labels: mysql, license
Labels:
mysql mysql Delete
license license Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.