測試start backup和ndb_restore
//數據節點建立表
10.10.54.67
mysql> create table aa(a int)engine=ndbcluster;
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| aa |
+----------------+
10.10.64.63自動
root@test 20:22>show tables;
+----------------+
| Tables_in_test |
+----------------+
| aa |
+----------------+
//管理節點上備份
10.10.54.64
ndb_mgm> start backup 8
//刪除表aa
10.10.54.67
root@test 20:18>drop table aa;
//10.10.64.67還原aa表
[root@Cent67 BACKUP]# ndb_restore -n2 -b8 -r -m --backup_path=/data/backup/BACKUP/BACKUP-8/
-b 備份號,
-n 節點號,
-r 恢復數據,
–m 恢復表結構,
//只備份表結構 -m只在第一次恢復時使用
ndb_restore -n2 -b8 -m --backup_path=/data/backup/BACKUP/BACKUP-8/
//在備份表數據
ndb_restore -n2 -b8 -r --backup_path=/data/backup/BACKUP/BACKUP-8/
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| aa |
+----------------+
//10.10.64.63自動
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| aa |
+----------------+
mysql