mongomirror is a utility for migrating data from an existing
MongoDB replica set to a MongoDB Atlas replica set.
mongomirror does not require you to shut down your existing replica
set or applications.

If the source replica set requires authentication, you must include
user credentials when running mongomirror. You must
specify a MongoDB user with backup role. If no
such user exists, create the user in your source MongoDB replica set.
For example, if the source replica set uses SCRAM-SHA1
authentication:

First, mongomirror performs an initial sync, copying
collections from the existing MongoDB replica set to the target
cluster in Atlas. mongomirror does not copy the
config database.

Note

Starting in version 0.5.0, mongomirror builds
all indexes on the destination cluster in the foreground,
regardless of how the indexes were built on the source
cluster. Foreground index builds block all other operations on
the database. For more information on foreground index builds,
see Index Build Operations on a Populated Collection.

After the initial sync, mongomirror continuously
tails the replica set’s oplog for incoming changes and replays
them on the target cluster in MongoDB Atlas.

Once started, mongomirror runs continuously until you shut
down the process. To fully migrate to the Atlas, continue on to
Switch to Atlas steps.