[SERVER-34869] Feature that allows Renaming Replica Sets (sharded as well as un-sharded environments) Created: 07/May/18  Updated: 29/Sep/23  Resolved: 22/Aug/23

Status: Closed
Project: Core Server
Component/s: Replication, Sharding
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Harshad Dhavale Assignee: Backlog - Replication Team
Resolution: Won't Do Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-46901 Test the commonly used procedure for ... Closed
related to SERVER-46905 Test the commonly used procedure for ... Closed
related to SERVER-18831 Reset replication while online Backlog
is related to SERVER-8778 Improve usability around merging shar... Closed
Assigned Teams:
Replication
Participants:
Case:

 Description   

As documented, we officially do not support renaming of replica sets. There are some unofficial-procedures documented on Stack Overflow and DOCS-4798. However, there is no officially-supported procedure or feature for renaming replica sets (sharded or unsharded).

 

This enhancement request is for requesting an officially-supported feature that will allow changing replica set names for sharded as well as unsharded environments.



 Comments   
Comment by Garaudy Etienne [ 29/Sep/23 ]

Starting in MongoDB 8.0, the way to do this will be:

  1. Add a new shard with the desired replica set name
  2. Run moveCollection on all your unsharded collections to move them to the new shard
  3. Drop the old shard
Comment by Ramabathiran Arumugam [ 15/Jul/20 ]

We have been using MongoDB for several years.    Some time Business/ Application team wants to change/rename the Replica Set (RS) name online to meet some internal requirements.

Supported methods are backup/restore or mongodump/mongo restore.    It requires downtime.  If the database size is high, it takes several hrs of downtime.   This will not help for critical instances, which requires 24x7 availability.

Few years back, we used this method to rename Replica Sets.   It worked fine.    However Mongo officially do not support.   At the same did not provide alternative feature even after several years.    Mongo sould come with rename feature by "updating metadata" rather than migrating "huge amount of user data" (like other database products does)

It will be a good future most of Customers will need.   It will benefit and attract more customers use MongoDB.

Comment by Howard Lee [ 08/Oct/18 ]

It'd be nice to have a feature, implemented in a form a mongo shell command, or thru automation agent, to change the replica set name without downtime. We have clusters set up from years ago that retained {{rs0}}replica set (since it is what was used in MongoDB Doc). We also have clusters that needed to change replica set name to be more identifiable in a Project.

Generated at Thu Feb 08 04:38:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.