Skip to content

Commit 6d41699

Browse files
JuliaMongomongodb-docs
andauthored
(DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose (#166)
* (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * Fixing the path to the nodeJS examples * Include copy review * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * Minor change to run the build * Fixing the path to the nodeJS examples * Trying to fix the path to the node JS examples in the makefile * Trying to fix the path to the node JS examples in the makefile * Removing the node.js example as it is not used * fixing the merge * Edits, still * Edits, still * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * Minor change to run the build * Fixing the path to the nodeJS examples * Trying to fix the path to the node JS examples in the makefile * Trying to fix the path to the node JS examples in the makefile * Removing the node.js example as it is not used * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * (DOCSP-19581) Updates to Oplog user permissions for Live Migration from Compose * Fixing the path to the nodeJS examples * Include copy review * Edits, still * Edits, still * tech review --adding comments from Mamoona and Marie * tech review --adding comments from Mamoona and Marie * tech review --adding comments from Mamoona and Marie * tech review --adding comments from Mamoona and Marie * Tech review from Mamoona Co-authored-by: mongodb-docs <mongodb-docs@mongodbdocs-VirtualBox>
1 parent 6870a95 commit 6d41699

File tree

3 files changed

+43
-14
lines changed

3 files changed

+43
-14
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ examples:
6060
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-ruby-driver/master/spec/integration/change_stream_examples_spec.rb -o ${DRIVERS_PATH}/change_stream_examples_spec.rb
6161
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-scala-driver/master/driver/src/it/scala/org/mongodb/scala/DocumentationExampleSpec.scala -o ${DRIVERS_PATH}/DocumentationExampleSpec.scala
6262
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-csharp-driver/master/tests/MongoDB.Driver.Examples/DocumentationExamples.cs -o ${DRIVERS_PATH}/DocumentationExamples.cs
63-
curl -SfL https://raw.githubusercontent.com/mongodb/node-mongodb-native/master/test/examples/change_streams.js -o ${DRIVERS_PATH}/ChangeStreamNodeExamples.js
6463
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-csharp-driver/master/tests/MongoDB.Driver.Examples/ChangeStreamExamples.cs -o ${DRIVERS_PATH}/ChangeStreamExamples.cs
6564
#curl -SfL https://raw.githubusercontent.com/mongodb/mongo-c-driver/master/tests/test-mongoc-sample-commands.c -o ${DRIVERS_PATH}/test-mongoc-sample-commands.c
6665
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-go-driver/master/examples/documentation_examples/examples.go -o ${DRIVERS_PATH}/examples.go
@@ -76,7 +75,6 @@ examples:
7675
cp examples/go/connect/connect.go ${DRIVERS_PATH}/connect.go
7776
cp examples/motor/connect/connect.py ${DRIVERS_PATH}/motorconnect.py
7877
cp examples/python/connect/connecttest.py ${DRIVERS_PATH}/connecttest.py
79-
cp examples/node/connect/connect.js ${DRIVERS_PATH}/connect.js
8078
cp examples/java/ConnectExample.java ${DRIVERS_PATH}/JavaConnectExample.java
8179
cp examples/java/ConnectExampleLegacy.java ${DRIVERS_PATH}/JavaConnectExampleLegacy.java
8280

source/includes/migration-pr-compose.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@
5353
5454
mongo <mongodb-connection-string> -u <mongodb-username> -p --authenticationDatabase admin
5555
56-
* The database user from your source cluster that you will use to perform the migration has the required MongoDB roles.
56+
* The database user from your source cluster that you will use to perform
57+
the migration has the required MongoDB roles.
5758

58-
The user must have the :authrole:`clusterMonitor` and :authrole:`backup` roles. To verify
59-
that the database user that you intend to use for migration has the appropriate
60-
roles, run the :manual:`db.getUser() </reference/method/db.getUser/>` command against the admin database.
59+
- The :authrole:`readAnyDatabase` role.
60+
- The :authrole:`clusterMonitor` role.
61+
- The :authrole:`backup` role.
62+
63+
To verify that the database user that will run the Live Migration
64+
process has these roles, run the :manual:`db.getUser()
65+
</reference/method/db.getUser/>` command on the ``admin`` database.
6166

6267
.. code-block:: javascript
6368
@@ -76,5 +81,20 @@
7681
"role" : "clusterMonitor",
7782
"db" : "admin"
7883
}
84+
{
85+
"role" : "readAnyDatabase",
86+
"db" : "admin"
87+
}
7988
]
8089
} ...
90+
91+
In addition, the database user from your source cluster in Compose
92+
must have the role to read the oplog on your ``admin`` database. See
93+
:atlas:`Oplog Access </reference/atlas-oplog/>`. You obtain access to
94+
this role when you add the oplog user in Compose in the following
95+
procedure.
96+
If you can't grant all of these permissions to the database user from
97+
your source cluster in Compose, the Live Migration process will not work.
98+
In this case, use :atlas:`mongodump and mongorestore </import/mongorestore/>`
99+
to migrate your data to Atlas.
100+

source/includes/steps-migrate-compose.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,29 @@ content: |
2222
title: Create an oplog user
2323
ref: create-oplog-reader
2424
content: |
25-
To perform the migration process, you need a database user with
26-
permission to read the oplog on your ``admin`` database. Click the
27-
:guilabel:`Add-ons` link in the left-side navigation. If you don't
28-
have the :guilabel:`Oplog Access` add-on, add it with the
29-
:guilabel:`Add` button.
3025
31-
If you already have the :guilabel:`Oplog Access` add-on, click
32-
:guilabel:`Configure` to see the oplog user username and password.
33-
You'll need them both in subsequent migration steps.
26+
a. Click the :guilabel:`Add-ons` link in the left-side navigation. If
27+
you don't have the :guilabel:`Oplog Access` add-on, add it with the
28+
:guilabel:`Add` button.
3429
30+
#. If you already have the :guilabel:`Oplog Access` add-on, click
31+
:guilabel:`Configure` to see the oplog user username and password.
32+
3533
.. figure:: /images/compose-oplog-addon.png
3634
:figwidth: 700px
35+
36+
To perform the migration process, the oplog user must have
37+
the following privileges:
38+
39+
- The :authrole:`readAnyDatabase` role.
40+
- The :authrole:`clusterMonitor` role.
41+
- The :authrole:`backup` role.
42+
43+
If you can't grant these permissions to the oplog user,
44+
the Live Migration process will not work. In this case, use
45+
:atlas:`mongodump and mongorestore </import/mongorestore/>` to migrate
46+
your data to Atlas.
47+
3748
---
3849
title: Begin the Atlas Live Migration process
3950
ref: begin-live-migration

0 commit comments

Comments
 (0)