GridGain CLI Tool
Overview
The GridGain CLI communicates with the cluster via the REST API, allowing you to configure the entire cluster or apply node-specific settings. You can run the CLI either in the interactive mode or execute commands without entering it.
Interactive CLI Mode
To use the CLI in the interactive mode, first run it, then configure the cluster or node using the update
command.
For example, to add a new user to the cluster:
cluster config update ignite.security.authentication.providers.default.users=[{username=newuser,displayName=newuser,password="newpassword",passwordEncoding=PLAIN,roles=[system]}]
Non-Interactive CLI Mode
Non-interactive mode is useful for quick updates or when running commands in scripts.
When running commands non-interactively, enclose arguments in quotation marks to ensure that special POSIX characters (such as {
and }
) are interpreted correctly:
bin/gridgain9 cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"
bin/gridgain9.bat cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"
Alternatively, you can use the backslash (\
) to escape all special characters in your command. For example:
bin/gridgain9 cluster config update ignite.security.authentication.providers.default.users=\[\{username\=newuser,displayName\=newuser,password\=\"newpassword\",passwordEncoding\=PLAIN,roles\=\[system\]\}\]
bin/gridgain9.bat cluster config update ignite.security.authentication.providers.default.users=\[\{username\=newuser,displayName\=newuser,password\=\"newpassword\",passwordEncoding\=PLAIN,roles\=\[system\]\}\]
Non-interactive mode is also useful in automation scripts. For example, you can set configuration items in a Bash script as follows:
#!/bin/bash
...
bin/gridgain9 cluster config update "ignite.schemaSync={delayDurationMillis=500,maxClockSkewMillis=500}"
bin/gridgain9 cluster config update "ignite.security.authentication.providers.default.users=[{username=newuser,displayName=newuser,password=\"newpassword\",passwordEncoding=PLAIN,roles=[system]}]"
Commands and Options
The following commands can be executed in the interactive CLI mode.
CLI Commands
These commands help you configure your CLI tool and cluster.
Command | Parameters | Description |
---|---|---|
|
|
Creates a profile with the given name, optionally by copying an existing profile, optionally activating the new profile upon creation. |
|
|
Activates the profile identified by name. |
|
Lists configuration profiles. |
|
|
Gets the current profile details. |
|
|
|
Gets the value for the specified configuration key. |
|
|
Sets configuration parameters using comma-separated input key-value pair(s). |
|
Shows the currently active configuration. |
|
|
|
Removes the specified configuration key. |
Cluster Commands
These commands let you manage your cluster.
Command | Parameters | Description |
---|---|---|
|
|
Shows configuration of the cluster indicated by the endpoint URL and, optionally, by a configuration path selector. |
|
|
Updates configuration of the cluster indicated by the endpoint URL with the provided argument values. |
|
|
Initializes a cluster, optionally for the indicated cluster URL, optionally with Cluster Management Group and Cluster Metastorage nodes specified, with the cluster configuration optionally provided in a file or multiple files. The path to config files is resolved relative to the folder the CLI tool is started from. |
|
|
Disables metrics from the specifies source on all nodes of the cluster. |
|
|
Enables metrics for the specifies source on all nodes of the cluster. |
|
Prints a list of metric sources for each of the cluster’s nodes, along with each source’s status (enabled or disabled). |
|
|
|
Displays the detailed status of the specified cluster. |
|
|
Shows Physical Topology of the specified cluster, optionally in a plain format. |
|
|
Shows Logical Topology of the specified cluster, optionally in a plain format. |
|
|
Deploys the specified version of a unit, from the specified path, optionally tp specific nodes. |
|
|
Un-deploys the specified unit version, optionally for the specified cluster. |
|
|
Lists cluster’s deployed units, optionally filtered by status. |
|
|
Connects to the specified node, optionally with the specified user name (u) an password (p). |
|
Disconnects from the current cluster. |
Snapshot Commands
Command | Parameters | Description |
---|---|---|
|
|
Creates a new snapshot, optionally at the indicated timestamp, optionally for the indicated cluster URL, optionally for the specified tables only, optionally at the specified destination (referred to by the path name). |
|
|
Deletes the specified snapshot, optionally for the indicated cluster URL. |
|
|
Restores data from the specified snapshot, optionally for the indicated cluster URL, optionally for the specified tables only, optionally from the specified source (referred to by the path name). |
|
|
Provides information about the current status of the specified snapshot, optionally for the indicated cluster URL, optionally for the specified tables only. If no snapshot ID is specified, provides information about the status of all snapshots. |
Node Commands
These commands address specific node(s) in a cluster.
Command | Parameters | Description |
---|---|---|
|
|
Gets the specified node (n) configuration. |
|
|
Updates the local node configuration with the arguments in the HOCON format. |
|
|
Shows the status of the default node, or a different one if specified. |
|
|
Shows the node’s build version. |
|
|
Lists node’s metrics. |
|
|
Enables a metric source for the node. |
|
|
Disables a metric source for the node. |
|
|
Lists node metrics' sources. |
|
|
Lists node’s deployment units. |
Disaster Recovery Commands
These commands enable you to:
-
Recover data partitions in a number of disaster scenarios
-
Recover system RAFT groups
Command | Parameters | Description |
---|---|---|
|
|
Restarts the indicated partitions of the specified distribution zone (if not specified, all existing partitions) on the indicated nodes. |
|
|
Resets the indicated partitions (if not specified, all existing partitions) in the indicated zones. This operation is irreversible. It can lead to data loss. Use with caution, and only when strictly necessary. |
|
|
Returns the partition states (local or global), optionally for the indicated nodes and/or zones and/or partitions. |
|
|
Initiates CMG node group repair to restore the lost majority. The command is sent to the node indicated by the |
|
|
Initiates MG node group repair to restore the lost majority. |
|
|
Initiates migration of a CMG or MG node that did not take part in recovery performed by |
User and Role Commands
These commands help you manage access to the system - users and and roles.
Command | Parameters | Description |
---|---|---|
|
|
Creates a new role, optionally for the indicated cluster endpoint URL. New roles do not have any privileges. |
|
|
Deletes the specified role, optionally from the indicated cluster endpoint URL. Role with assigned privileges cannot be deleted. |
|
|
Lists roles, optionally for the indicated cluster endpoint URL, optionally filtered by user(s). |
|
|
Shows the role information, optionally including privileges assigned to the role and/or the users who have that role, optionally for the indicated cluster endpoint URL. |
|
|
Grants to the specified role a privilege (permission to perform the specified action on an the specified object). For more information, see User Permissions and Roles. |
|
|
Revokes privilege(s) (permissions)(s) to perform the specified action on the specified object) from the role. For more information, see User Permissions and Roles. |
|
|
Creates a new user. |
|
|
Deletes the user. |
|
|
Edits user configuration. |
|
|
Provides a list of users on the server, optionally filtered by role. |
|
|
Provides extended information about the specific user, optionally with information about roles assigned to that user. |
|
|
Assigns role(s) to the specified user. |
|
|
Revokes role(s) from the specified user. |
Data Center Replication Commands
These commands address data center replication needs.
Command | Parameters | Description |
---|---|---|
|
|
Creates a replication from the source cluster to the current cluster. |
|
|
Deletes replication specified by the cluster URL and replication name. |
|
|
Sets a replication flush point with the provided ISO time. |
|
|
Lists all replications for the specified cluster, along with their statuses, optionally in a plain format. |
|
|
Starts or resumes the replication specified by name. |
|
|
Stops replication specified by ID. |
|
|
Shows the current status of the specific replication. |
Distribution Commands
These commands address partition distribution.
Command | Parameters | Description |
---|---|---|
|
|
Resets the algorithm state for partition distribution in all tables within the specified zones. Generates partition assignments "from scratch" (as if the same table (zone) was just created on the data nodes. This ensures data colocation between tables in a zone. |
Miscellaneous Commands
These are general-purpose commands.
Command | Parameters | Description |
---|---|---|
|
Clears the terminal. Equivalent to |
|
|
Clears the terminal. Equivalent to |
|
|
Stops the current interactive session. |
|
|
|
Provides information on available command groups, commands in the specified group, or for the specified command. |
|
|
Executes the specified SQL query (command) or the queries included in the specified file, on the specified cluster. |
|
|
Revokes the JWT token. Can revoke a specific token, or all tokens for the specified user. |
|
Displays the current CLI tool version. |
License Commands
These commands can be used to manage the license on a running cluster.
Command | Parameters | Description |
---|---|---|
|
|
Updates the license used by the cluster with the license from the specified file. |
|
|
Displays the current license used by the cluster. |
CLI Tool Logs
CLI tool stores extended logs for your operations. These logs contain additional information not displayed during normal operation. You can configure the directory in the following ways:
-
By setting the
IGNITE_CLI_LOGS_DIR
environment variable to the directory logs will be stored it. -
By setting the
$XDG_STATE_HOME
environment variable to set the CLI home folder. This configuration variable follows the XDG Base Directory Specification and does not override theIGNITE_CLI_LOGS_DIR
. If$XDG_STATE_HOME
is set andIGNITE_CLI_LOGS_DIR
is not, logs will be stored in$XDG_STATE_HOME/ignitecli/logs
directory.
If neither of the above properties are set, the logs are stored in the following locations:
-
On Unix systems and MacOS, in the
~/.local/state/ignitecli/logs
directory; -
On Windows, in the
%USERPROFILE%\.local\state\ignitecli\logs
folder.
© 2025 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.