Mysql Cluster backup and recovery

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.