Skip to content

Commit 8f43344

Browse files
authored
DOCSP-49945: --config (#12250)
* commit * config commit * push * feedback removing ?
1 parent 4333e6d commit 8f43344

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed
Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
Specifies the full path to a YAML configuration file containing
2-
sensitive values for the following options to |tool-binary|:
1+
Specifies the full path to a YAML configuration file that contains
2+
sensitive values for the following |tool-binary| options:
33

44
- :option:`--password`
55
- :option:`--uri`
66
- :option:`--sslPEMKeyPassword`
77

88
This is the recommended way to specify a password to |tool-binary|,
9-
aside from specifying it through a password prompt.
9+
aside from specifying it through a password prompt. You can use any combination
10+
of the arguments in the file.
1011

1112
The configuration file takes the following form:
1213

@@ -16,16 +17,22 @@ The configuration file takes the following form:
1617
uri: mongodb://mongodb0.example.com:27017
1718
sslPEMKeyPassword: <password>
1819
19-
Specifying a password to the ``password:`` field and providing a
20-
connection string in the ``uri:`` field which contains a conflicting
21-
password will result in an error.
20+
If you specify the ``password`` option without specifying ``uri``, you can
21+
specify the other components of the connection string by using |tool-binary|
22+
command line options, such as :option:`--username` and :option:`--host`.
2223

2324
Be sure to secure this file with appropriate filesystem permissions.
2425

25-
.. note::
26+
.. important::
2627

27-
If you specify a configuration file with :option:`--config` and
28-
also use the :option:`--password`, :option:`--uri` or
29-
:option:`--sslPEMKeyPassword` option to |tool-binary|, each
30-
command line option overrides its corresponding option in the
31-
configuration file.
28+
When using the ``--config`` option, keep the following limitations and
29+
behaviors in mind:
30+
31+
- If you provide the ``password`` field and provide a connection
32+
string in the ``uri`` field with a conflicting password,
33+
``mongorestore`` throws an error.
34+
35+
- If you specify a configuration file with ``--config`` and also use
36+
the :option:`--password`, :option:`--uri`, or :option:`--sslPEMKeyPassword`
37+
|tool-binary| command line options, the command line option overrides
38+
the corresponding configuration file option.

0 commit comments

Comments
 (0)