4.6.2.1 简单备份

要创建备份,请使用以backup cluster集群名称作为参数的命令,类似于此处显示的内容:

mcm> backup cluster mycluster;
+-------------------------------+
| Command result                |
+-------------------------------+
| Backup completed successfully |
+-------------------------------+
1 row in set (3.31 sec)

backup cluster只需要将集群的名称作为参数进行备份;有关此命令支持的其他选项的信息,请参阅 第 5.7.2 节,“backup cluster命令”。要验证 的新备份是否mycluster使用唯一 ID 创建,请检查 的输出list backups,如下所示(其中与新备份文件对应的行用强调文本表示):

mcm> list backups mycluster;
+----------+--------+---------+---------------------+--------+---------+
| BackupId | NodeId | Host    | Timestamp           | Parts  | Comment |
+----------+--------+---------+---------------------+--------+---------+
| 1        | 1      | tonfisk | 2020-12-04 12:03:52 | 1      |         |
| 1        | 2      | tonfisk | 2020-12-04 12:03:52 | 1      |         |
| 2        | 1      | tonfisk | 2020-12-04 12:04:15 | 1      |         |
| 2        | 2      | tonfisk | 2020-12-04 12:04:15 | 1      |         |
| 3        | 1      | tonfisk | 2020-12-04 12:17:41 | 1      |         |
| 3        | 2      | tonfisk | 2020-12-04 12:17:41 | 1      |         |
| 4        | 1      | tonfisk | 2020-12-12 14:24:35 | 1      |         | 
| 4        | 2      | tonfisk | 2020-12-12 14:24:35 | 1      |         |
+----------+--------+---------+---------------------+--------+---------+
8 rows in set (0.04 sec)

如果您尝试创建 MySQL NDB Cluster 的备份,其中每个节点组都没有至少一个数据节点在运行, 则会backup cluster失败并显示错误Backup cannot be performed as processes are stopped in cluster cluster_name