Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to back up and restore MySQLCluster through commands

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to back up and restore MySQLCluster through commands. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Backup: use the ndb_mgm management client to back up. Execute ndb_mgm in the management node to enter the management command line. Enter startbackup to back up all nodes, and if followed by the id of the corresponding data node, only the corresponding data node will be backed up.

Restore: 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

How to back up and restore MySQLCluster through commands

Start the data node:

/ usr/bin/ndbd--initial

When the first node is restored:

/ usr/bin/ndb_restore-c192.168.100.223-n11-b1-m-r--backup_path=/data/dbdata1/BACKUP/BACKUP-1/

When other nodes are restored (future nodes do not need to add the-m parameter):

/ usr/bin/ndb_restore-c192.168.100.223-n11-b1-r--backup_path=/data/dbdata1/BACKUP/BACKUP-1/

Among them, 192.168.100.223 is the IP,-n of the management node, followed by the backupid,-r data switch to be restored by the node id,-b, that is, the data is restored, and-m restores the table structure.

After importing the table structure, you can restore it in parallel!

The mysqld node is needed for recovery, so you need to add multiple empty mysqld nodes, and the empty mysqld node should at least have the same data as your mysqld node.

When restoring hard disk tables, after initialization with-initial, there is no need to recreate data filegroups, redo log files, tablespaces, and data files, but will be created automatically during restore.

The above is all the contents of the article "how to back up and restore MySQLCluster by command". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report