Solution for migrating MongoDB replica sets to TokuMX

Source: Internet
Author: User
It is relatively simple to change the server migration solution. You can directly use semi sync to synchronize data to the TokuMX environment in real time without stopping the application. Do not change the server migration scheme. In this scheme, the application must be stopped for several seconds or several seconds are affected. The connection string must be written into the ip address and port of the two nodes. 1. Remove the slave database and delete the data directory files of the machine where the slave database is located.

It is relatively simple to change the server migration solution. You can directly use semi sync to synchronize data to the TokuMX environment in real time without stopping the application. Do not change the server migration scheme. In this scheme, the application must be stopped for several seconds or several seconds are affected. The connection string must be written into the ip address and port of the two nodes. 1. Remove the slave database and delete the data directory files of the machine where the slave database is located.

Change server migration Solution

This is relatively simple. You can directly use semi sync to synchronize data to the TokuMX environment in real time without stopping the application.

Migration solution without changing servers

The application of this solution needs to be stopped for several seconds or several seconds affected.
The connection string must be written into the ip address and port of the two nodes.

1. Remove the slave database and delete the data directory files (release space) of the machine where the slave database is located );
2. Build the TokuMX standalone replica set architecture on the machine where the slave database is located;
3. Synchronize (or export) data to TokuMX through semi sync (Time consumed when the data volume is large );
4. After data synchronization (or export and import) is completed, the original master database of the application stops writing data and closes the original master database;
5. (optional. Copy the new TokuMX physical file to the master database. If the space is sufficient, copy it before stopping the application in Step 4 );
6. When write is enabled, the application is written to the new TokuMX;
7. Delete the data directory file (release space) of the machine where the original master database is located, and add it to the new TokuMX replica integrator.
Or use the physical file copied from 5 when the data volume is large.

Switching can be completed in seconds at the fastest speed, which is equivalent to master-slave switching.

Original article address: MongoDB replica set migration to TokuMX solution. Thank you for sharing it with the original author.

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.