Navigation

Alpha Release of MongoDB CLI

This is a pre-release early version of MongoDB CLI. Do not use MongoDB CLI to manage production environments.

mongocli ops-manager cluster shutdown

On this page

The cluster shutdown command shuts down the replica set mongod processes for the specified cluster in the specified Ops 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 Ops Manager UI.

Note

When you shutdown a process, replica set, or cluster, Ops 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.

Syntax

mongocli ops-manager|om cluster shutdown <cluster-name>
     [ --force ]
     [ --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?
<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
--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 that contains the cluster to shutdown. If omitted, uses the project ID in the profile or environment variable. no

Output

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 http://<hostname>:<port>/v2/<projectID>#deployment/topology for status

where:

  • <hostname>:<port> is the Ops Manager base URL.
  • <projectID> is the unique identifier of the project that contains the cluster being shut down.

Examples

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

Example 1

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

~  mongocli om cluster shutdown myCluster --projectId 5e2dec2131cd7c007880b05e --profile egOMprofile
Are you sure you want to shutdown: myCluster Yes

Example 2

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

~ mongocli ops-manager cluster shutdown myCluster --projectId 5e2dec2131cd7c007880b05e --force

Output

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

Changes are being applied, please check http://localhost:30700/v2/5e2dec2131cd7c007880b05e#deployment/topology for status