mongocli ops-manager cluster shutdown
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 ] [ --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? |
---|---|---|---|
<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:
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 |
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 theOps 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 default profile to access the specified project.
~ mongocli om cluster shutdown myCluster --projectId 5e2dec2131cd7c007880b05e 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
profile OMprofile
to access the specified project.
mongocli ops-manager cluster shutdown myCluster --projectId 5e2dec2131cd7c007880b05e --profile OMprofile --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