Skip to content

Commit a18f21d

Browse files
authored
(DOCSP-12724)(DOCSP-12741)(DOCSP-12753)(DOCSP-12754)(DOCSP-12755) om admin backup s3 commands (#386)
* (DOCSP-12724)(DOCSP-12741)(DOCSP-12753)(DOCSP-12754)(DOCSP-12755) om admin backup s3 commands
1 parent 98ed5f0 commit a18f21d

7 files changed

+1077
-0
lines changed
Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
.. _mcli-om-admin-backup-s3-create-cmd:
2+
3+
===========================================
4+
mongocli ops-manager admin backup s3 create
5+
===========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
.. include:: /includes/admonitions/admin-requires-global-owner.rst
16+
17+
The ``admin backup s3 create`` command creates a new backup
18+
:opsmgr:`S3 blockstore </reference/glossary/#term-s3-snapshot-store>`
19+
configuration for your |onprem| deployment. You can also create an
20+
|s3| configuration using the :opsmgr:`UI </tutorial/manage-s3-blockstore-storage/#add-one-s3-snapshot-store>` and the
21+
:opsmgr:`API </reference/api/admin/backup/snapshot/s3Configs/create-one-s3-blockstore-configuration/>`.
22+
23+
.. _mcli-om-admin-backup-s3-create-syntax:
24+
25+
Syntax
26+
------
27+
28+
.. code-block:: shell
29+
30+
mongocli ops-manager|om admin backup s3 create
31+
--acceptedTos
32+
[ --assignment ]
33+
[ --awsAccessKey <access-key-id> ]
34+
[ --awsSecretKey <secret-access-key> ]
35+
[ --disableProxyS3 ]
36+
[ --encryptedCredentials ]
37+
[ --label <tags> ]
38+
[ --loadFactor <number-of-backup-jobs> ]
39+
--name <s3-name>
40+
[ --output|-o ]
41+
[ --pathStyleAccessEnabled ]
42+
[ --profile|-P <profile-name> ]
43+
--s3AuthMethod <KEYS|IAM_ROLE>
44+
--s3BucketEndpoint <bucket-url>
45+
--s3BucketName <bucket-name>
46+
--s3MaxConnections <number-of-connections>
47+
[ --sseEnabled ]
48+
--uri <hosts>
49+
[ --writeConcern <write-concern> ]
50+
51+
.. _mcli-om-admin-backup-s3-create-options:
52+
53+
Options
54+
-------
55+
56+
.. list-table::
57+
:widths: 20 10 60 10
58+
:header-rows: 1
59+
60+
* - Option
61+
- Type
62+
- Description
63+
- Required?
64+
65+
* - ``--acceptedTos``
66+
-
67+
- Flag indicating that you accept the terms of service
68+
for using S3-compatible stores with |mms|.
69+
- yes
70+
71+
* - ``--assignment``
72+
-
73+
- Flag that indicates this :opsmgr:`S3 blockstore
74+
</reference/glossary/#term-s3-snapshot-store>` can be assigned
75+
backup jobs.
76+
- no
77+
78+
* - ``--awsAccessKey``
79+
- string
80+
- AWS Access Key ID that can access the S3 bucket.
81+
82+
If ``s3AuthMethod`` is ``IAM_ROLE``, you do not need to include
83+
``awsAccessKey``.
84+
- no
85+
86+
* - ``--awsSecretKey``
87+
- string
88+
- AWS Secret Access Key that can access the S3 bucket.
89+
90+
If ``s3AuthMethod`` is ``IAM_ROLE``, you do not need to include
91+
``awsSecretKey``.
92+
- no
93+
94+
* - ``--disableProxyS3``
95+
-
96+
- Flag indicating whether the |http| proxy should be used when
97+
connecting to S3.
98+
- no
99+
100+
* - ``--encryptedCredentials``
101+
-
102+
- Flag that indicates whether the username and password for this
103+
|s3| were encrypted using the :opsmgr:`credentialstool
104+
</tutorial/encrypt-user-credentials/>`.
105+
- no
106+
107+
* - ``--label``
108+
- array of strings
109+
- Array of tags that specify which :opsmgr:`backup jobs
110+
</reference/glossary/#term-backup-job>` |onprem| can assign
111+
to which :opsmgr:`S3s
112+
</reference/glossary/#term-s3-snapshot-store>`. If omitted, this
113+
|s3| can only process the backup jobs for projects that
114+
don't use labels to filter their jobs.
115+
- no
116+
117+
* - ``--loadFactor``
118+
- number
119+
- Required if more than one snapshot store is in use.
120+
121+
Number that expresses how much backup work this
122+
:opsmgr:`snapshot store </reference/glossary/#term-snapshot-store>` should perform compared to another
123+
snapshot store. Value must be a positive, non-zero integer.
124+
125+
.. seealso::
126+
127+
To learn more about **Load Factor**, see
128+
:opsmgr:`Edit an Existing S3 </tutorial/manage-s3-blockstore-storage/#update-any-values-that-need-to-be-changed>`.
129+
- no
130+
131+
* - ``--name``
132+
- string
133+
- Name of the |s3| blockstore configuration.
134+
- yes
135+
136+
* - ``--output``, ``-o``
137+
- string
138+
- .. include:: /includes/extracts/fact-basic-options-output.rst
139+
- no
140+
141+
* - ``--pathStyleAccessEnabled``
142+
-
143+
- Flag indicating that ``s3BucketEndpoint`` uses a path-style URL.
144+
- no
145+
146+
* - ``--profile``, ``-P``
147+
- string
148+
- Name of the profile where the public and private
149+
keys for accessing |onprem| are saved. If omitted, uses the
150+
{+default-profile+}. To learn more about creating a
151+
profile, see :ref:`mcli-configure`.
152+
- no
153+
154+
* - ``--s3AuthMethod``
155+
- string
156+
- Method used to authorize access to the |s3| bucket specified
157+
with ``s3BucketName``. Accepted values for this option are:
158+
159+
- ``KEYS``
160+
- ``IAM_ROLE``
161+
- yes
162+
163+
* - ``--s3BucketEndpoint``
164+
- string
165+
- URL used to access this |aws| |s3| or S3-compatible bucket.
166+
- yes
167+
168+
* - ``--s3BucketName``
169+
- string
170+
- Name of this |aws| |s3| or S3-compatible bucket.
171+
- yes
172+
173+
* - ``--s3MaxConnections``
174+
- integer
175+
- Positive integer indicating the maximum number of connections to
176+
this |s3| blockstore.
177+
- yes
178+
179+
* - ``--sseEnabled``
180+
-
181+
- Flag indicating whether this |s3| blockstore enables server-side
182+
encryption.
183+
- no
184+
185+
* - ``--uri``
186+
- string
187+
- Comma-separated list of hosts in the ``<hostname:port>``
188+
format to use to access this :opsmgr:`S3
189+
</reference/glossary/#term-s3-snapshot-store>`.
190+
- yes
191+
192+
* - ``--writeConcern``
193+
- string
194+
- :manual:`Write concern </reference/write-concern/>` to use for
195+
this :opsmgr:`S3
196+
</reference/glossary/#term-s3-snapshot-store>`. Valid values are:
197+
198+
- ``ACKNOWLEDGED``
199+
- ``W2``
200+
- ``JOURNALED``
201+
- ``MAJORITY``
202+
203+
- no
204+
205+
.. _mcli-om-admin-backup-s3-create-output:
206+
207+
Output
208+
------
209+
210+
.. include:: /includes/command-output-intro.rst
211+
212+
.. code-block:: sh
213+
:copyable: false
214+
215+
s3 configuration '<s3-name>' created.
216+
217+
If you request output in |json| format, the command returns the fields
218+
described in the
219+
:opsmgr:`API reference </reference/api/admin/backup/snapshot/s3Configs/create-one-s3-blockstore-configuration/#response>`.
220+
221+
.. _mcli-om-admin-backup-s3-create-egs:
222+
223+
Examples
224+
--------
225+
226+
.. tabs::
227+
228+
.. tab:: Default Output
229+
:tabid: default
230+
231+
The following ``mongocli om admin backup s3 create`` command
232+
creates the ``s3BackupExample`` |s3| blockstore configuration
233+
using the {+default-profile+}, which contains the
234+
:authrole:`Global Owner` credentials for accessing |mms|.
235+
236+
.. code-block:: shell
237+
238+
mongocli om admin backup s3 create s3BackupExample \
239+
--acceptedTos \
240+
--s3AuthMethod KEYS \
241+
--awsAccessKey access \
242+
--awsSecretKey secret \
243+
--s3BucketEndpoint https://s3.us-east-1.amazonaws.com/bucketExample/ \
244+
--s3BucketName bucketExample \
245+
--uri mongodb://127.0.0.1:27017 \
246+
--s3MaxConnections 50
247+
248+
The previous command returns the following:
249+
250+
.. code-block:: shell
251+
:copyable: false
252+
253+
s3 configuration 's3BackupExample' created.
254+
255+
.. tab:: JSON Output
256+
:tabid: json
257+
258+
The following ``mongocli om admin backup s3 create`` command
259+
creates the ``s3BackupExample`` |s3| blockstore configuration
260+
using the {+default-profile+}, which contains the
261+
:authrole:`Global Owner` credentials for accessing |mms|. The
262+
output is returned in |json| format.
263+
264+
.. code-block:: shell
265+
266+
mongocli om admin backup s3 create s3BackupExample \
267+
--acceptedTos \
268+
--s3AuthMethod KEYS \
269+
--awsAccessKey access \
270+
--awsSecretKey secret \
271+
--s3BucketEndpoint https://s3.us-east-1.amazonaws.com/bucketExample/ \
272+
--s3BucketName bucketExample \
273+
--uri mongodb://127.0.0.1:27017 \
274+
--s3MaxConnections 50 \
275+
--output json
276+
277+
The previous command returns the following:
278+
279+
.. code-block:: json
280+
:copyable: false
281+
282+
{
283+
"id": "s3BackupExample",
284+
"uri": "mongodb://127.0.0.1:27017",
285+
"ssl": false,
286+
"assignmentEnabled": true,
287+
"encryptedCredentials": false,
288+
"loadFactor": 1,
289+
"awsAccessKey": "access",
290+
"awsSecretKey": "secret",
291+
"s3BucketEndpoint": "https://s3.us-east-1.amazonaws.com/bucketExample/",
292+
"s3BucketName": "bucketExample",
293+
"s3MaxConnections": 50,
294+
"disableProxyS3": false,
295+
"acceptedTos": true,
296+
"sseEnabled": false,
297+
"pathStyleAccessEnabled": false
298+
}

0 commit comments

Comments
 (0)