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

mongocli ops-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 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.

mongocli ops-manager|om 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 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.

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

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 default profile to access the specified project.

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

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 profile OMprofile to access the specified project.

mongocli ops-manager cluster shutdown myCluster --projectId 5e2dec2131cd7c007880b05e --profile OMprofile --force

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

Back

Start mongod Processes for a Cluster