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

mongocli cloud-manager cluster shutdown

On this page

  • Syntax
  • Options
  • Output
  • Examples

The cluster shutdown command shuts down the replica set mongod processes for the specified cluster in the specified Cloud Manager project. The command prompts you to confirm the operation when you run the command without the --force option. You can also shut down the mongod processes from the MongoDB Cloud Manager UI.

Note

When you shutdown a process, replica set, or cluster, Cloud Manager continues to manage it, even though it is not running. Your data is not removed and you can restart your process, cluster, or replica set and access your data.

mongocli cloud-manager|cm cluster shutdown <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.

Option
Type
Description
Required?
<cluster-name>
string
Name of the cluster that contains the replica set to shut down.
yes
--force
Flag that indicates that the replica set mongod processes can be shut down without prompting for confirmation.
no
--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 public and private keys for the project are set. 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 command output to the terminal looks similar to the following if the command succeeds. If the command prints errors, see Troubleshooting for recommended solutions.

Changes are being applied, please check https://cloud.mongodb.com/v2/<projectID>#deployment/topology for status

where projectID is the unique identifier of the project that contains the cluster being shut down.

The following examples show the different ways to run the command.

The following mongocli cloud-manager cluster shutdown command does not prompt for confirmation before shutting down the replica set mongod processes for the cluster named Cluster1 in the specified project. It uses the default profile for accessing the specified project.

mongocli cm cluster shutdown Cluster1 --projectId 5e2f06127a3e5a5700de8d8d --force

The following mongocli cm cluster shutdown command prompts for confirmation before shutting down the the replica set mongod processes for the cluster named Cluster2 in the specified project. It uses the profile named egCMprofile for accessing the specified project.

mongocli cm cluster shutdown Cluster2 --projectId 5e2f06127a3e5a5700de8d8d --profile egCMprofile
Are you sure you want to shutdown: Cluster2 Yes

The Example 1 and Example 2 commands print the following to the terminal:

Changes are being applied, please check https://cloud.mongodb.com/v2/5e2f06127a3e5a5700de8d8d#deployment/topology for status

Back

Start mongod Processes for a Cluster