How to prevent instance with restored snapshot from joining replica set

I have a five member replica set running at AWS. I have added a hidden replica to the set (the “snapshot replica”). The snapshot replica’s mongo databases are stored on an EBS volume. Once a day it shuts down mongo for a few seconds and initiates a snapshot.

I’d like to verify my snapshots. I want to start up a new mongo instance attached to the snapshot. (Let’s call it “the validator”)

I can do this. The problem is that it still has it still has it’s replica set configuration.

I would like to somehow purge the replica settings before starting mongod, so that there is no possiblity of something replication related going wrong. (e.g. accidentally turning every replica into a master running on

How would I do this, or do something equivalent to ensure that “the validator” never speaks to the active replica set?

Thank you for any help,


I do this online, not in AWS but Azure.

It does. But as long as the replication.replSetName ans/or --replSet is not set it will not attempt to join nor be a valid taget for the cluster to connect to.

It is a good idea to use a different port and/or --bind_ip ‘just in case’

If you are attaching the snapshot as you are I would do it like this.
sudo mongodb mongod --bind_ip --port 7777 --dbpath /path/to/data

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.