3.7 Backing Up and Restoring MySQL Cluster Manager Agents

This section explains how to back up configuration data for
mcmd agents and how to restore the backed-up
agent data. Used together with the backup
cluster command, the backup
agents command allows you to backup and restore a
complete cluster-plus-manager setup.

If no host names are given with the backup
agents command, backups are created for all agents of
the site:

If no site name is given, only the agent that the
mcm client is connected to is backed up.

The backup for each agent includes the following contents from the
agent repository (mcm_data folder):

The rep subfolder

The metadata files high_water_mark and
repchksum

The repository is locked while the backup are in progress, to
avoid creating an inconsistent backup. The backup for each agent
is created in a subfolder named
rep_backup/timestamp
under the agent's mcm_data folder, with
timestamp reflecting the time the
backup began. If you want the backup to be at another place,
create a soft link from mcm_data/rep_backup
to your desired storage location.

For MySQL Cluster Manager 1.4.6 and later: You can list agent
backups using the list
backups command with the
--agent
option and the site name:

The backup may be manually restored on just one, or more than one
agents. If backup is restored for only one agent on, say, host A,
host A will contact the other agents of the site to make them
recover their repositories from host A using the usual mechanism
for agent recovery. If all agents on all hosts are restored and
restarted manually, the situation will be similar to the normal
restarting all agents after stopping them at slightly different
points in time.

If configuration changes has been made to the cluster since the
restored backup was created, the same changes must be made again
after the agent restores have been completed, to ensure that the
agents' configurations match those of the actual running cluster.
For example: sometime after a backup was done, a set
MaxNoOfTables:ndbmtd=500 mycluster command was issued
and soon afterward, something happened and corrupted the agent
repository; after the agent backup was restored, the same
set command has to be rerun in order to update
the mcmd agents' configurations. While the
command does not effectively change anything on the cluster
itself, after it has been run, a rolling restart of the cluster
processes using the restart
cluster command is still required.