a) Backup: Use ndb_mgm management client for backup
Execute ndb_mgm on the management node to enter the management command line, as shown above!
Enter start backup to back up all nodes. If it is followed by the ID of the corresponding data node, only the corresponding data node will be backed up.
b) Recovery: Use the command ndb_restore to restore. The specific process is as follows:
Start the management node
/usr/bin/ndb_mgmd -f /usr/local/mysql/mysql-cluster/config.ini --reload
Start data node:
/usr/bin/ndbd --initial
When the first node is restored
/usr/bin/ndb_restore - c 192.168.100.223 -n 11 -b 1 -m -r --backup_path=/data/dbdata1/BACKUP/BACKUP-1/
When other nodes are restored (no need to add the -m parameter for future nodes)
/usr/ bin/ndb_restore -c 192.168.100.223 -n 11 -b 1 -r --backup_path=/data/dbdata1/BACKUP/BACKUP-1/
Where 192.168.100.223 is the IP of the management node, and -n is followed by the node id , -b backupid to be restored, -r data switch, which means restoring data, -m restore table structure
After importing the table structure, you can perform parallel recovery!
You need to use the mysqld node during recovery, so you need to add multiple empty mysqld nodes. The empty mysqld nodes should at least have the same data as your mysqld node.
When restoring the hard disk table, after using -initial to initialize, there is no need to re-create the data file group, redo log file, table space and data file. They will be created automatically during the restore