测试start backup和ndb_restore

淺唱寂寞╮ 提交于 2019-12-01 21:23:42

测试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             |
+----------------+

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!