mongocli ops-manager admin backup s3 create
Note
You must be a Global Owner
to run admin
commands.
The admin backup s3 create
command creates a new backup
S3 blockstore
configuration for your Ops Manager deployment. You can also create an
S3 configuration using the UI and the
API.
Syntax
mongocli ops-manager|om admin backup s3 create --acceptedTos [ --assignment ] [ --awsAccessKey <access-key-id> ] [ --awsSecretKey <secret-access-key> ] [ --disableProxyS3 ] [ --encryptedCredentials ] [ --label <tags> ] [ --loadFactor <number-of-backup-jobs> ] --name <s3-name> [ --output|-o ] [ --pathStyleAccessEnabled ] [ --profile|-P <profile-name> ] --s3AuthMethod <KEYS|IAM_ROLE> --s3BucketEndpoint <bucket-url> --s3BucketName <bucket-name> --s3MaxConnections <number-of-connections> [ --sseEnabled ] --uri <hosts> [ --writeConcern <write-concern> ]
Options
Option | Type | Description | Required? |
---|---|---|---|
--acceptedTos | Flag indicating that you accept the terms of service
for using S3-compatible stores with Ops Manager . | yes | |
--assignment | Flag that indicates this S3 blockstore can be assigned
backup jobs. | no | |
--awsAccessKey | string | AWS Access Key ID that can access the S3 bucket. If | no |
--awsSecretKey | string | AWS Secret Access Key that can access the S3 bucket. If | no |
--disableProxyS3 | Flag indicating whether the HTTP proxy should be used when
connecting to S3. | no | |
--encryptedCredentials | Flag that indicates whether the username and password for this
S3 were encrypted using the credentialstool. | no | |
--label | array of strings | Array of tags that specify which backup jobs Ops Manager can assign
to which S3s. If omitted, this
S3 can only process the backup jobs for projects that
don't use labels to filter their jobs. | no |
--loadFactor | number | Required if more than one snapshot store is in use. Number that expresses how much backup work this snapshot store should perform compared to another snapshot store. Value must be a positive, non-zero integer. | no |
--name | string | Name of the S3 blockstore configuration. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--pathStyleAccessEnabled | Flag indicating that s3BucketEndpoint uses a path-style URL. | no | |
--profile , -P | string | Name of the profile where the public and private
keys for accessing Ops Manager are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no |
--s3AuthMethod | string | Method used to authorize access to the S3 bucket specified
with
| yes |
--s3BucketEndpoint | string | URL used to access this AWS S3 or S3-compatible bucket. | yes |
--s3BucketName | string | Name of this AWS S3 or S3-compatible bucket. | yes |
--s3MaxConnections | integer | Positive integer indicating the maximum number of connections to
this S3 blockstore. | yes |
--sseEnabled | Flag indicating whether this S3 blockstore enables server-side
encryption. | no | |
--uri | string | Comma-separated list of hosts in the <hostname:port>
format to use to access this S3. | yes |
--writeConcern | string | Write concern to use for this S3. Valid values are:
| no |
Output
The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
s3 configuration '<s3-name>' created.
If you request output in JSON format, the command returns the fields described in the API reference.
Examples
The following mongocli om admin backup s3 create
command
creates the s3BackupExample
S3 blockstore configuration
using the default profile, which contains the
Global Owner
credentials for accessing Ops Manager
.
mongocli om admin backup s3 create s3BackupExample \ --acceptedTos \ --s3AuthMethod KEYS \ --awsAccessKey access \ --awsSecretKey secret \ --s3BucketEndpoint https://s3.us-east-1.amazonaws.com/bucketExample/ \ --s3BucketName bucketExample \ --uri mongodb://127.0.0.1:27017 \ --s3MaxConnections 50
The previous command returns the following:
s3 configuration 's3BackupExample' created.
The following mongocli om admin backup s3 create
command
creates the s3BackupExample
S3 blockstore configuration
using the default profile, which contains the
Global Owner
credentials for accessing Ops Manager
. The
output is returned in JSON format.
mongocli om admin backup s3 create s3BackupExample \ --acceptedTos \ --s3AuthMethod KEYS \ --awsAccessKey access \ --awsSecretKey secret \ --s3BucketEndpoint https://s3.us-east-1.amazonaws.com/bucketExample/ \ --s3BucketName bucketExample \ --uri mongodb://127.0.0.1:27017 \ --s3MaxConnections 50 \ --output json
The previous command returns the following:
{ "id": "s3BackupExample", "uri": "mongodb://127.0.0.1:27017", "ssl": false, "assignmentEnabled": true, "encryptedCredentials": false, "loadFactor": 1, "awsAccessKey": "access", "awsSecretKey": "secret", "s3BucketEndpoint": "https://s3.us-east-1.amazonaws.com/bucketExample/", "s3BucketName": "bucketExample", "s3MaxConnections": 50, "disableProxyS3": false, "acceptedTos": true, "sseEnabled": false, "pathStyleAccessEnabled": false }