Docs Menu

Docs HomeMongoDB Command Line Interface

mongocli atlas backups snapshots create

On this page

  • Syntax
  • Arguments
  • Options
  • Inherited Options
  • Examples

Create a backup snapshot for your project and cluster.

You can create on-demand backup snapshots for Atlas cluster tiers M10 and larger.

To use this command, you must authenticate with a user account or an API key that has the Project Owner role.

mongocli atlas backups snapshots create <clusterName> [options]
Name
Type
Required
Description
clusterName
string
true
Name of the Atlas cluster whose snapshot you want to restore.
Name
Type
Required
Description
--desc
string
true
Description of the on-demand snapshot.
-h, --help
false
help for create
-o, --output
string
false
Output format. Valid values are json, json-path, go-template, or go-template-file.
--projectId
string
false
Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
--retention
int
false
Number of days that Atlas should retain the on-demand snapshot. Must be at least 1. This value defaults to 1.
Name
Type
Required
Description
-P, --profile
string
false
Human-readable label that identifies the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.
# Create a backup snapshot for the cluster named myDemo that Atlas retains for 30 days:
mongocli atlas backups snapshots create myDemo --desc "test" --retention 30
←  mongocli atlas backups snapshotsmongocli atlas backups snapshots delete →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.