Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

atlas backups snapshots create

Create a backup snapshot for your project and cluster.

Public Preview: The atlas api sub-command, automatically generated from the MongoDB Atlas Admin API, offers full coverage of the Admin API and is currently in Public Preview (please provide feedback at https://feedback.mongodb.com/forums/930808-atlas-cli). Admin API capabilities have their own release lifecycle, which you can check via the provided API endpoint documentation link.

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

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

On this page