mongocli atlas backup snapshots delete
The backup snapshots delete
command deletes a specified backup snapshot.
You can also delete a snapshot through the Atlas UI or API.
Syntax
mongocli atlas backup snapshots delete <snapshot-id> --clusterName <cluster-name> [ --force ] [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
<snapshot-id> | string | Unique identifier of the snapshot. | yes |
--clusterName | string | Name of the cluster. | yes |
--force | Flag that indicates that the snapshot can
be deleted without requiring confirmation. | no | |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--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 |
Output
If the command is successful, it returns the following response:
Snapshot '<snapshot-id>' deleted
Example
The following example uses the mongocli atlas backup snapshots delete
command to delete a backup snapshot for the cluster named myDemo
. The
command uses the default profile, where the project ID and the
Programmatic API Keys are stored.
mongocli atlas backups snapshots delete 5f4007f327a3bd7b6f4103c5 --clusterName myDemo
The command prints the following output to the terminal.
Snapshot '5f4006d29d52d968122ee664' deleted