Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / / /

mongocli ops-manager admin backup blockstore create

On this page

  • Syntax
  • Options
  • Output
  • Examples

Note

The admin backup blockstore create command creates a new backup blockstore configuration. You can also create a backup blockstore configuration using the API.

mongocli ops-manager|om admin backup blockstore create
--name <blockstore-name>
--uri <hosts>
[ --assignment ]
[ --encryptedCredentials ]
[ --label <tags> ]
[ --loadFactor <number-of-backup-jobs> ]
[ --maxCapacityGB <amount-of-data> ]
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --ssl ]
[ --writeConcern <write-concern> ]
Option
Type
Description
Required?
--name
string
Name of the backup blockstore configuration.
yes
--uri
string
Comma-separated list of hosts in the <hostname:port> format to use to access this blockstore.
yes
--assignment
Flag that indicates whether this blockstore can be assigned backup jobs.
no
--encryptedCredentials
Flag that indicates whether the username and password for this blockstore were encrypted using the credentialstool.
no
--label
array of strings
Array of tags that specify which backup jobs Ops Manager can assign to which blockstores. If omitted, this blockstore 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 Blockstore.

no
--maxCapacityGB
number
Maximum amount of data in GB that this blockstore can store.
no
--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 Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--ssl
Flag that indicates whether this blockstore only accepts connections encrypted using TLS.
no
--writeConcern
string

Write concern to use for this blockstore. Valid values are:

  • ACKNOWLEDGED

  • W2

  • JOURNALED

  • MAJORITY

no

If the command succeeds, it returns the following message in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

Blockstore configuration '<blockstore-ID>' created.

If you request output in JSON format, the command returns the fields described in the API reference.

The following mongocli om admin backup blockstore create command creates the test blockstore using the default profile, which contains the credentials for accessing Ops Manager.

mongocli om admin backup blockstore create --name test --uri mongodb://localhost:27017

The previous command returns the following:

Blockstore configuration 'test' created.
mongocli om admin backup blockstore create --name test --uri mongodb://localhost:27017 --output json

The previous command returns the following:

{
"id": "test",
"uri": "mongodb://localhost:27017",
"ssl": false,
"assignmentEnabled": false,
"encryptedCredentials": false,
"loadFactor": 1
}

Back

List Backup Blockstore Configurations