Navigation

mongocli cloud-manager backup config update

The backup config update command updates one backup configuration. You can also update a backup configuration using the API.

mongocli cloud-manager|cm backup config update <cluster-ID>
[ --authMechanism <authentication-mechanism> ]
[ --encryption ]
[ --excludedNamespace <excluded-namespaces> ]
[ --includedNamespace <included-namespaces> ]
[ --output|-o <command-output-format> ]
[ --password <sync-source-db-password> ]
[ --projectId <project-ID> ]
[ --provisioned ]
[ --ssl ]
[ --status <backup-configuration-status> ]
[ --storageEngine <backup-storage-engine> ]
[ --syncSource <sync-source-mongod-instance> ]
[ --username <sync-source-db-username> ]
Argument
Type
Description
Required?
<cluser-ID>
string
Unique identifier of the cluster whose backup configuration you want to update. You can use the mongocli cloud-manager cluster list to retrieve the ID of a cluster.
yes
Option
Type
Description
Required?
--authMechanism
string

Required if the sync store uses authentication.

Authentication mechanism to use to connect to the sync source database. Valid values are:

  • MONGODB_CR, which includes SCRAM-SHA-1, SCRAM-SHA-256, and MONGODB-CR and requires --username and --password options also
  • GSSAPI
  • PLAIN
  • MONGODB_X509
  • NONE
no
--encryption
Flag to enable encryption for the backup data. You must include the syncSource option when enabling encryption. To enable encryption for existing backups in a project, you must do an initial backup sync to recreate the backups' head databases.
no
--excludedNamespace
array of strings

List of namespaces, which include the database name, the dot (.) separator, and the collection or view name (e.g. <database>.<collection>), to omit from the backup. Mutually exclusive with includedNamespace.

The list must include both new and existing excluded namespaces. If an existing excluded namespace is omitted from the list to remove it, you must set the syncSource option for a full resyc. The syncSource is not required if the list does not remove any existing namespace.

If omitted, all namespaces are included in the backup.

This option only applies to head databases running MongoDB FCV v4.0 or earlier.

no
--includedNamespace
array of strings

List of namespaces, which include the database name, the dot (.) separator, and the collection or view name (e.g. <database>.<collection>), to include in the backup. If set, Cloud Manager doesn't backup any namespace not in this list. Mutually exclusive with excludedNamespace.

The list must include both new and existing included namespace. If an existing included namespace is omitted from the list to remove it, you must set the syncSource option for a full resyc. The syncSource is not required if the list does not remove any existing namespace.

If omitted, all namespaces are included in the backup.

This option only applies to head databases running MongoDB FCV v4.0 or earlier.

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 the Go template file

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

no
--password
string

Required if the sync source mongod instances require clients to authenticate.

Password to use to connect to the sync source database.

conditional
--profile, -P
string
Name of the profile where the project ID and the Programmatic API 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
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no
--provisioned
Flag to provision the resources needed to store a backup. If omitted, Cloud Manager doesn't provision the resources to store a backup.
no
--ssl
Flag to enable TLS for the sync source database. If omitted, Cloud Manager does not enable TLS for the sync source database.
no
--status
string

Desired status of the backup configuration. Valid values are:

  • INACTIVE
  • PROVISIONING
  • STARTED
  • STOPPED
  • TERMINATING

If omitted, Cloud Manager doesn't modify the current status of the backup configuration. For more information, see Backup Definition and Operational States.

no
--storageEngine
string

Storage engine to use for the backup. Valid values are:

  • MEMORY_MAPPED
  • WIRED_TIGER, which also requires syncSource to be set.
no
--syncSource
string

Required if storageEngine is WIRED_TIGER.

mongod instance from which to retrieve backup data. You can provide either the hostname of the mongod instance or one of the following:

  • PRIMARY
  • SECONDARY
conditional
--username
string

Required if the sync source mongod instances require clients to authenticate or if you are updating the backup configuration of a replica set or sharded cluster that Cloud Manager doesn't manage.

Username to use to connect to the sync source database.

conditional

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

PROJECT ID CLUSTER ID STATUS STORAGE ENGINE
<project-ID> <cluster-ID> <status> <storage-engine>

The default output contains a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the API reference.

The following example uses the mongocli cloud-manager backup config update command updates the backup configuration for the specified cluster. The command uses the default profile for accessing the Atlas project.

mongocli cloud-manager backup config update 5fa958c2d765fe62f0aff5fc

The previous command returns the following:

PROJECT ID CLUSTER ID STATUS STORAGE ENGINE
5fa95889d765fe62f0aff52f 5fa958c2d765fe62f0aff5fc STARTED WIRED_TIGER
Give Feedback