MySQL 8.4 Release Notes
25.6.17.3 NDBinfo backup_id 表
该表提供了查找当前集群中最近启动的备份 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>
在这种情况下,backup_id
表包含以下单独行,使用 mysql 客户端:
mysql> USE ndbinfo;
Database changed
mysql> SELECT * FROM backup_id;
+------+
| id |
+------+
| 3 |
+------+
1 row in set (0.00 sec)
如果找不到备份,可以在表中找到一个单独的行,id
值为 0
。