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:
3
3
4
4
- :option: `--password `
5
5
- :option: `--uri `
6
6
- :option: `--sslPEMKeyPassword `
7
7
8
8
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.
10
11
11
12
The configuration file takes the following form:
12
13
@@ -16,16 +17,22 @@ The configuration file takes the following form:
16
17
uri: mongodb://mongodb0.example.com:27017
17
18
sslPEMKeyPassword: < password>
18
19
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 ` .
22
23
23
24
Be sure to secure this file with appropriate filesystem permissions.
24
25
25
- .. note ::
26
+ .. important ::
26
27
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