Navigation

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.

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> ]
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 s3AuthMethod is IAM_ROLE, you do not need to include awsAccessKey.

no
--awsSecretKey
string

AWS Secret Access Key that can access the S3 bucket.

If s3AuthMethod is IAM_ROLE, you do not need to include awsSecretKey.

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.

Tip
See also:

To learn more about Load Factor, see Edit an Existing S3.

no
--name
string
Name of the S3 blockstore configuration.
yes
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

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 s3BucketName. Accepted values for this option are:

  • KEYS
  • IAM_ROLE
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:

  • ACKNOWLEDGED
  • W2
  • JOURNALED
  • MAJORITY
no

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.

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.
Give Feedback