Home Database Mysql Tutorial 一种MongoDB分片集群迁移的方案

一种MongoDB分片集群迁移的方案

Jun 07, 2016 pm 04:39 PM
mongodb Fragmentation Scenes plan Production migrate cluster

场景: 生产环境,所有机器全部更换。需要短暂的影响或暂停业务(迁移config servers的时间) 步骤: 迁移3台config servers ,建议不换主机名迁移,迁移过程中及迁移后后老的mongos仍能访问,详见 Migrate Config Servers with the Same Hostname,以hosts

场景:
生产环境,所有机器全部更换。需要短暂的影响或暂停业务(迁移config servers的时间)
步骤:

  1. 迁移3台config servers ,建议不换主机名迁移,迁移过程中及迁移后后老的mongos仍能访问,详见 Migrate Config Servers with the Same Hostname,以hosts文件配置为例,更改config server对应域名指向的ip为新的ip即可。新的config servers启动正常后,业务可开启。
  2. 在新的机器启动新的mongos。
  3. 各片添加新的数据节点。
  4. 各片删除老的数据节点。
  5. 删除老的mongos。

总结:总体步骤清晰简单,但要注意细节的处理,集群很大的话,过程比较缓慢。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the long tail problem in autonomous driving scenarios? How to solve the long tail problem in autonomous driving scenarios? Jun 02, 2024 pm 02:44 PM

Yesterday during the interview, I was asked whether I had done any long-tail related questions, so I thought I would give a brief summary. The long-tail problem of autonomous driving refers to edge cases in autonomous vehicles, that is, possible scenarios with a low probability of occurrence. The perceived long-tail problem is one of the main reasons currently limiting the operational design domain of single-vehicle intelligent autonomous vehicles. The underlying architecture and most technical issues of autonomous driving have been solved, and the remaining 5% of long-tail problems have gradually become the key to restricting the development of autonomous driving. These problems include a variety of fragmented scenarios, extreme situations, and unpredictable human behavior. The "long tail" of edge scenarios in autonomous driving refers to edge cases in autonomous vehicles (AVs). Edge cases are possible scenarios with a low probability of occurrence. these rare events

How to transfer WeChat chat history to another mobile phone How to transfer WeChat chat history to another mobile phone May 08, 2024 am 11:20 AM

1. On the old device, click "Me" → "Settings" → "Chat" → "Chat History Migration and Backup" → "Migrate". 2. Select the target platform device to be migrated, select the chat records to be migrated, and click "Start". 3. Log in with the same WeChat account on the new device and scan the QR code to start chat record migration.

Cloud Modernization with C++: Migrating Legacy Applications to the Cloud Cloud Modernization with C++: Migrating Legacy Applications to the Cloud Jun 01, 2024 am 09:21 AM

The best way to move legacy C++ applications to the cloud: Re-platform: Move the application code to a cloud-native platform (such as Kubernetes) and leverage cloud services. Cloudization: Deploy applications on cloud platforms and utilize cloud services without code refactoring.

What is the use of net4.0 What is the use of net4.0 May 10, 2024 am 01:09 AM

.NET 4.0 is used to create a variety of applications and it provides application developers with rich features including: object-oriented programming, flexibility, powerful architecture, cloud computing integration, performance optimization, extensive libraries, security, Scalability, data access, and mobile development support.

How to configure MongoDB automatic expansion on Debian How to configure MongoDB automatic expansion on Debian Apr 02, 2025 am 07:36 AM

This article introduces how to configure MongoDB on Debian system to achieve automatic expansion. The main steps include setting up the MongoDB replica set and disk space monitoring. 1. MongoDB installation First, make sure that MongoDB is installed on the Debian system. Install using the following command: sudoaptupdatesudoaptinstall-ymongodb-org 2. Configuring MongoDB replica set MongoDB replica set ensures high availability and data redundancy, which is the basis for achieving automatic capacity expansion. Start MongoDB service: sudosystemctlstartmongodsudosys

How to ensure high availability of MongoDB on Debian How to ensure high availability of MongoDB on Debian Apr 02, 2025 am 07:21 AM

This article describes how to build a highly available MongoDB database on a Debian system. We will explore multiple ways to ensure data security and services continue to operate. Key strategy: ReplicaSet: ReplicaSet: Use replicasets to achieve data redundancy and automatic failover. When a master node fails, the replica set will automatically elect a new master node to ensure the continuous availability of the service. Data backup and recovery: Regularly use the mongodump command to backup the database and formulate effective recovery strategies to deal with the risk of data loss. Monitoring and Alarms: Deploy monitoring tools (such as Prometheus, Grafana) to monitor the running status of MongoDB in real time, and

Navicat's method to view MongoDB database password Navicat's method to view MongoDB database password Apr 08, 2025 pm 09:39 PM

It is impossible to view MongoDB password directly through Navicat because it is stored as hash values. How to retrieve lost passwords: 1. Reset passwords; 2. Check configuration files (may contain hash values); 3. Check codes (may hardcode passwords).

AI coding, is it a real need or a gimmick? AI coding, is it a real need or a gimmick? Jun 02, 2024 am 10:15 AM

Guest | Interview by Xu Xiaoqiang | Written by Zhang Xiaonan | Produced by Li Meihan | 51CTO Technology Stack (WeChat ID: blog51cto) Since the popularity of generative AI, AI seems to have "struggled" with the role of programmers. Almost every once in a while, the topic of whether AI programming tools can replace programmers will be discussed again. The heated discussion aroused by AI programming makes people confused: Will this set off a productivity revolution in the field of programming? Or is this another over-hyped stunt? Thanks to AI programming, Baidu has achieved a 10% improvement in human efficiency, and 27% of the new code submitted by engineers today was generated by AI. The pioneers of this answer are the major manufacturers who are exploring this answer. However, as the architect of Baidu Comate, I am also the founder of this product.

See all articles