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

mongocli ops-manager admin backup oplog create

On this page

  • Syntax
  • Options
  • Output
  • Examples

Note

The admin backup oplog create command creates a new oplog store configuration. You can also create an oplog store configuration using the UI and the API.

mongocli ops-manager|om admin backup oplog(s) create
[ --assignment ]
[ --encryptedCredentials ]
[ --label <tags> ]
--name <blockstore-name>
[ --maxCapacityGB <amount-of-data> ]
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --ssl ]
--uri <hosts>
[ --writeConcern <write-concern> ]

Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--assignment
Flag that indicates whether this oplog store can be assigned backup jobs.
no
--encryptedCredentials
Flag that indicates whether the username and password for this oplog store were encrypted using the credentialstool.
no
--label
array of strings
Array of tags that specify which backup jobs Ops Manager can assign to which oplog stores. If omitted, this oplog store can only process the backup jobs for projects that don't use labels to filter their jobs.
no
--name
string
Name of the oplog store.
yes
--maxCapacityGB
number
Maximum amount of data in GB that this oplog store 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 oplog store only accepts connections encrypted using TLS.
no
--uri
string
Comma-separated list of hosts in the <hostname:port> format to use to access this oplog store.
yes
--writeConcern
string

Write concern to use for this oplog store. 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.

Oplog configuration '<oplog-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 oplog create command creates the test oplog store using the default profile, which contains the credentials for accessing Ops Manager.

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

The previous command returns the following:

Oplog configuration 'test' created.
mongocli om admin backup oplog 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

Describe One Backup Oplog Store Configuration