C.3 Backing up MySQL Enterprise Service Manager

All of the MySQL Enterprise Monitor repository information is stored within a set of databases, one is simply named "mem", and the others are prefixed by "mem__", with a suffix denoting the type of data stored, such as "mem__config", "mem__instruments", "mem__events", and so on. There is also a MySQL schema which stores the privilege data which you must also back up.

The following is an example of how to use mysqldump to export all databases in the repository instance to a dump file named mem.dump:


This example assumes you are using the MySQL instance solely as the repository for MySQL Enterprise Service Manager and not for any other purpose. This is the recommended implementation.

shell> mysqldump --hex-bin --single-transaction -uservice_manager -pPassword 
       -P13306 -h127.0.0.1 —all-databases > mem.dump

The above command creates a file, mem.dump, containing all of the MySQL Enterprise Monitor data.

To restore the dump file, run the following mysql command on a clean instance:

      mysql> -u <user> -p < mem.dump      

You should also backup the following files:

You can also use MySQL Enterprise Backup to manage your repository backup process. For more information, see the MySQL Enterprise Backup documentation.

To ensure consistency in a recovery situation, you may also want to back up the agent configuration and metadata stored on each monitored MySQL server. To do this:

In case the backup process makes the Service Manager unresponsive for a time, you might also adjust the agent-backlog-timeout setting as appropriate, to avoid losing data from the agents during a backup of the repository database.