MySQL 8.4 发行说明
此表提供了一种方法来查找最近为此集群启动的备份的 ID。
backup_id
表包含一个列 id
,它对应于使用 ndb_mgm 客户端 START BACKUP
命令获取的备份 ID。 此表包含一行。
示例:假设在 NDB 管理客户端中发出了以下 START BACKUP
命令序列,并且自集群首次启动以来未进行任何其他备份
ndb_mgm> START BACKUP
Waiting for completed, this may take several minutes
Node 5: Backup 1 started from node 50
Node 5: Backup 1 started from node 50 completed
StartGCP: 27894 StopGCP: 27897
#Records: 2057 #LogRecords: 0
Data: 51580 bytes Log: 0 bytes
ndb_mgm> START BACKUP 5
Waiting for completed, this may take several minutes
Node 5: Backup 5 started from node 50
Node 5: Backup 5 started from node 50 completed
StartGCP: 27905 StopGCP: 27908
#Records: 2057 #LogRecords: 0
Data: 51580 bytes Log: 0 bytes
ndb_mgm> START BACKUP
Waiting for completed, this may take several minutes
Node 5: Backup 6 started from node 50
Node 5: Backup 6 started from node 50 completed
StartGCP: 27912 StopGCP: 27915
#Records: 2057 #LogRecords: 0
Data: 51580 bytes Log: 0 bytes
ndb_mgm> START BACKUP 3
Connected to Management Server at: localhost:1186 (using cleartext)
Waiting for completed, this may take several minutes
Node 5: Backup 3 started from node 50
Node 5: Backup 3 started from node 50 completed
StartGCP: 28149 StopGCP: 28152
#Records: 2057 #LogRecords: 0
Data: 51580 bytes Log: 0 bytes
ndb_mgm>
之后,使用 mysql 客户端,backup_id
表将包含此处显示的单行
mysql> USE ndbinfo;
Database changed
mysql> SELECT * FROM backup_id;
+------+
| id |
+------+
| 3 |
+------+
1 row in set (0.00 sec)
如果找不到备份,则该表包含一行,其中 id
值为 0
。