Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

atlas backups snapshots create

On this page

  • Syntax
  • Arguments
  • Options
  • Inherited Options
  • Output
  • 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 with the Project Owner role. Atlas supports this command only for M10+ clusters.

Command Syntax
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. To see the full output, use the -o json option.
--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
Name of 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.

If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.

Snapshot '<Id>' created.
# Create a backup snapshot for the cluster named myDemo that Atlas retains for 30 days:
atlas backups snapshots create myDemo --desc "test" --retention 30

Back

snapshots