A) backup: The ndb_mgm management client is used for backup.
Run ndb_mgm on the Management node to enter the management command line, such!
Enter start backup to back up all nodes. If the id of the corresponding data node is followed, only the corresponding data nodes are backed up.
B) restore: Use the command ndb_restore to restore the database. The specific process is as follows:
Start a management Node
/Usr/bin/ndb_mgmd-f/usr/local/mysql-cluster/config. ini -- reload
Start the 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-1/
When other nodes are restored (the-m parameter is not required for later nodes)
/Usr/bin/ndb_restore-c 192.168.100.223-n 11-B 1-r -- backup_path =/data/dbdata1/BACKUP-1/
192.168.100.223 is the IP address of the Management node.-n is followed by the node id,-B is the backupid to be restored, and-r data switch is used to restore the data.-m is used to restore the table structure.
After importing the table structure, you can restore it in parallel!
Mysqld nodes are used for restoration. Therefore, multiple empty mysqld nodes need to be added. The empty mysqld node should be at least the same as your mysqld node data.
When you restore a hard disk table, you do not need to re-create a data file group, redo log file, tablespace, and data file after initialization with-initial. It is automatically created during restoration.