Comment on page
Cluster/Server Commands (gx cluster)
Cluster/Server management-related commands.
Get deployment information like:
- Information about the server
- CPU information and statistics
- Disk information
- And much more

GX server/node info
Prints a summary of the cluster/server.
$> gx cluster info
{
"clusterId": "0",
"leaderNode": "0",
"nodes": {
"node": [{
"nodeConfig": {
"nodeIp": "10.138.0.42",
"adminIp": "10.138.0.42",
"nodeName": "gx0",
"numCtl": 4,
"rpcPort": 5055,
"metaPort": 55502,
"ctrServerPort": 5155,
"mxmgrPort": 5054,
"adminPort": 55503
},
"live": true
}]
}
}
Prints storage stats for the cluster/server.
$> gx cluster stats storage
Node ID DAT Topic
gxs-0 0 0.000% 0.000%
gxs-1 1 0.000% 0.000%
gxs-2 2 0.000% 0.000%
Backup cluster state to cloud storage or get the state of an ongoing backup.
--backup-id
- Backup ID for a previous backup. This can be used to get the status of an existing backup request.--destination
- Destination of the backup in the cloud.--passphrase
- Passphrase to encrypt data in backup.--gcp-sa-file
- Path to the gcp service account json.- This option needs to be provided when backing up to gcp.
--refresh-time
- Time, in seconds, to refresh the backup status. Default: 5s.
Examples:
gx cluster backup --backup-location "s3://grainite.backup.001/backup/cluster_5000/?AWS_ACCESS_KEY_ID=ABCDEFGHIJKL_SECRET_ACCESS_KEY=4MNOPQRSTUVWXYZ" --passphrase=test -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster backup --backup-location "s3://grainite.backup.001/backup/cluster_5000/?AWS_ACCESS_KEY_ID=ABCDEFGHIJKL_SECRET_ACCESS_KEY=4MNOPQRSTUVWXYZ" --passphrase=test -H 192.168.10.5
gx cluster backup --backup-location "gs://grainite.backup.001/backup/cluster_5000/" --gcp-sa-file ~/sa_auth.json --passphrase=test -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster backup --backup-location "gs://grainite.backup.001/backup/cluster_5000/" --gcp-sa-file ~/sa_auth.json --passphrase=test -H 192.168.10.5
gx cluster backup --backup-location az://container/location?DefaultEndpointsProtocol=https;AccountName=ABCDEF;AccountKey=123456;EndpointSuffix=core.windows.net --passphrase=abc123 -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster backup --backup-location az://container/location?DefaultEndpointsProtocol=https;AccountName=ABCDEF;AccountKey=123456;EndpointSuffix=core.windows.net --passphrase=abc123 -H 192.168.10.5
Restore cluster state from a backup in a cloud storage bucket.
--backup-location
- Source/Backup location (AWS URI) of the backup in AWS S3.--passphrase
- Passphrase used to encrypt data at backup.--gcp-sa-file
- Path to the gcp service account json.- This option needs to be provided when restoring from gcp.
Examples:
gx cluster restore --backup-location "s3://grainite.backup.001/backup/cluster_5000/?AWS_ACCESS_KEY_ID=ABCDEFGHIJKL_SECRET_ACCESS_KEY=4MNOPQRSTUVWXYZ" --passphrase=test -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster restore --backup-location "s3://grainite.backup.001/backup/cluster_5000/?AWS_ACCESS_KEY_ID=ABCDEFGHIJKL_SECRET_ACCESS_KEY=4MNOPQRSTUVWXYZ" --passphrase=test -H 192.168.10.5
gx cluster restore --backup-location "gs://grainite.backup.001/backup/cluster_5000/" --gcp-sa-file ~/sa_auth.json --passphrase=test -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster restore --backup-location "gs://grainite.backup.001/backup/cluster_5000/" --gcp-sa-file ~/sa_auth.json --passphrase=test -H 192.168.10.5
gx cluster restore --backup-location az://container/location?DefaultEndpointsProtocol=https;AccountName=ABCDEF;AccountKey=123456;EndpointSuffix=core.windows.net --passphrase=abc123 -H "aaabbbcccdddeeeffggghhhiii.elb.us-east-1.amazonaws.com"
gx cluster restore --backup-location az://container/location?DefaultEndpointsProtocol=https;AccountName=ABCDEF;AccountKey=123456;EndpointSuffix=core.windows.net --passphrase=abc123 -H 192.168.10.5
Get the cluster version.
Example:
$> gx cluster version
2307