Renaming mongo shards

Mongo has mostly excellent documentation, yet sometimes it may not be obvious how to do some less-used configuration changes. One of these is a way to rename mongo shards.

Renaming mongo shards can be done in the following way:

  • assume you have “non-portable” naming like this – if your server addresses change for some reason, you’re in trouble:

  • let’s say you want to rename them to,,

  • The last step is restarting all mongos instances; if possible, also restart mongod instances.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.