Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli atlas backup snapshots watch

On this page

  • Syntax
  • Options
  • Output
  • Example

The backup snapshots watch command monitors a specified backup snapshot until it completes or fails.

mongocli atlas backup snapshots watch <snapshot-id>
--clusterName <cluster-name>
[ --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.

Option
Type
Description
Required?
<snapshot-id>
string
Unique identifier of the snapshot.
yes
--clusterName
string
Name of the cluster.
yes
--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 Go template file

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

The backup watch command continuously polls a backup snapshot until it completes or fails. While the command is polling, it periodically prints dots (.) to the terminal.

The following example uses the mongocli atlas backup snapshots watch command to monitor 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 watch 5f4007f327a3bd7b6f4103c5 --clusterName myDemo

The command prints output to the terminal similar to the following:

.............
Snapshot changes completed.

Back

Describe a Backup Snapshot