Documentation Home
MySQL Cluster Manager 1.2 User Manual
Download this Manual

4.7.4 The restore cluster Command

restore cluster
    {--backupid=|-I }backup_id
    [[--parallelism=|-p ]#]
    [[--skip-nodeid=|-s ]id_list]

This command restores a cluster from a backup having the specified backup ID (--backupid option; short form: -I) to the MySQL Cluster named cluster_name. In its simplest form, it can be used as shown here, to restore the cluster named mycluster to the state saved in the backup having backup ID 3:

mcm> restore cluster --backupid=3 mycluster;
| Command result                 |
| Restore completed successfully |
1 row in set (18.60 sec)

If you are restoring an existing cluster to a known good state, you must wipe any existing first. Stop the cluster using stop cluster, then restart it using start cluster with the --initial option, which causes the data node file systems to be cleared. (Note that Disk Data files must be removed manually.) Following this, you can restore the cluster from the desired backup using restore cluster.


In order to restore a backup using restore cluster, the cluster must have an unused slot for an ndbapi process in its configuration. Otherwise, the command fails with the error Unable to perform restore - no vacant ndbapi slots in config for cluster cluster_name. See Section 4.4.1, “The create cluster Command”, for more information.

Additional options that can be employed with this command are described in the next few paragraphs.

--disable-indexes and --disable-metadata To cause indexes to be ignored when restoring the table data, use the --disable-indexes option (short form: -x). Doing this can decrease the time required to restore a large data set, particularly where many indexes were in use.

Similarly, you can cause metadata to be ignored during the restoration process by using the --disable-metadata option (short form: -M).

--no-binlog The --no-binlog option (short form: -l) stops any SQL nodes (mysqld processes) in the cluster from writing data from the restore into their binary logs.

--parallelism The --parallelism option (short form: -p) sets the maximum number of parallel transactions that the restore cluster command attempts to use. The default value is 128; the maximum is 1024, and the minium is 1.

--epoch When the --epoch option (short form: -e) is used, epoch information is restored to the cluster replication status table (mysql.ndb_apply_status), which can be useful for MySQL Cluster replication slaves.

--privilege-tables Causes restoration of tables required for distributed grants (see Distributed MySQL Privileges for MySQL Cluster). Added in MySQL Cluster Manager 1.2.4 (see Bug #16710567).

--skip-nodeid The --skip-nodeid option (short form: -s) takes a comma-separated list of data node IDs. Nodes having these IDs are skipped by the restoration process. Beginning with MySQL Cluster Manager 1.2.4, this option also supports SQL node IDs (Bug #16710567).

The restore backup command was added in MySQL Cluster Manager 1.2.1.

User Comments
Sign Up Login You must be logged in to post a comment.