MySQL Cluster Manager 8.0.31 用户手册 / 第 4 章使用 MySQL 集群管理器 / 4.6 使用 MySQL Cluster Manager 备份和恢复 MySQL NDB Cluster /
3.6.2 使用 MySQL Cluster Manager 进行基本的 MySQL NDB Cluster 备份和恢复
本节介绍备份和还原 MySQL NDB Cluster,以及完整和部分还原操作的示例。请注意,backup cluster
和restore
cluster
命令
NDB
仅适用于表格;使用其他 MySQL 存储引擎(例如
InnoDB
或
MyISAM
)的表将被忽略。
出于示例的目的,我们使用名为
mycluster
其进程和状态的 MySQL NDB Cluster 可以在此处看到:
mcm> show status -r mycluster;
+--------+----------+----------+---------+-----------+-----------+
| NodeId | Process | Host | Status | Nodegroup | Package |
+--------+----------+----------+---------+-----------+-----------+
| 49 | ndb_mgmd | tonfisk | running | | mypackage |
| 1 | ndbd | tonfisk | running | 0 | mypackage |
| 2 | ndbd | tonfisk | running | 0 | mypackage |
| 50 | mysqld | tonfisk | running | | mypackage |
| 51 | mysqld | tonfisk | running | | mypackage |
| 52 | ndbapi | *tonfisk | added | | |
| 53 | ndbapi | *tonfisk | added | | |
+--------+----------+----------+---------+-----------+-----------+
7 rows in set (0.08 sec)
mycluster
您可以使用该
命令
查看是否存在任何现有备份
list backups
,如下所示:
mcm> list backups mycluster;
+----------+--------+---------+---------------------+---------+
| BackupId | NodeId | Host | Timestamp | Comment |
+----------+--------+---------+---------------------+---------+
| 1 | 1 | tonfisk | 2012-12-04 12:03:52 | |
| 1 | 2 | tonfisk | 2012-12-04 12:03:52 | |
| 2 | 1 | tonfisk | 2012-12-04 12:04:15 | |
| 2 | 2 | tonfisk | 2012-12-04 12:04:15 | |
| 3 | 1 | tonfisk | 2012-12-04 12:17:41 | |
| 3 | 2 | tonfisk | 2012-12-04 12:17:41 | |
+----------+--------+---------+---------------------+---------+
6 rows in set (0.12 sec)