clusters¶
The clusters command lets you manage your CrateDB clusters.
Note
The clusters rely on an internal resource called project. If you want to deploy
a cluster, a default project will be created for you. You can also create projects
yourself with the projects command.
Usage: croud clusters [-h]
{get,list,deploy,scale,upgrade,delete,restart-node,set-deletion-protection,set-ip-whitelist,expand-storage,set-suspended-state,set-product,set-backup-schedule,snapshots,subscription,import-jobs,export-jobs,scheduled-jobs}
...
clusters list¶
List all clusters the current user has access to.
Usage: croud clusters list [-h] [-p PROJECT_ID] [--org-id ORG_ID]
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Optional Arguments¶
- -p, --project-id
The project ID to use. We recommend using the org-id instead
- --org-id
The organization ID to use.
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters list
+--------------------------------------+------------------------+-----------+---------------+---------------------------------------+-------------+-----------+--------------------------------------------------+---------+
| id | name | num_nodes | crate_version | project_id | username | suspended | fqdn | channel |
|--------------------------------------+------------------------+-----------+---------------+---------------------------------------+-------------+-----------+--------------------------------------------------|---------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | 1 | 4.5.1 | 952cd102-91c1-4837-962a-12ecb71a6ba8 | default | FALSE | my-first-crate-cluster.eastus.azure.cratedb.net. | stable |
+--------------------------------------+------------------------+-----------+---------------+---------------------------------------+-------------+-----------+--------------------------------------------------+---------+
clusters deploy¶
Tip
The minimum accepted length of password is 24 characters.
Be careful when specifying passwords on the command line. Some non-alphanumeric characters may be interpreted in an unexpected way by your shell. Use string delimitation and escape characters as needed.
Note
Free clusters can be deployed without a paid subscription. Therefore you can use
--subscription-id free_tier --product-name crfree.
Warning
Some optional arguments are for Edge regions only. An Edge region allows you to host CrateDB instances in your own infrastructure however this feature is not maintained anymore. It is not recommended to use it.
Deploy a new CrateDB cluster.
Usage: croud clusters deploy [-h] --product-name PRODUCT_NAME --tier TIER
[--unit UNIT] [-p PROJECT_ID] [--org-id ORG_ID]
--cluster-name CLUSTER_NAME --version VERSION
--username USERNAME --password PASSWORD
--subscription-id SUBSCRIPTION_ID
[--channel {stable,testing,nightly}]
[--cpus CPUS] [--disks DISKS]
[--disk-size-gb DISK_SIZE_GB]
[--disk-type {standard,premium}]
[--memory-size-mb MEMORY_SIZE_MB]
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- --product-name
The product name to use. Run
croud products list --kind clusterto get the list of available products.- --tier
The product tier to use. Run
croud products list --kind clusterto get the products tier.- --cluster-name
The CrateDB cluster name to use. It must be a URL-safe string.
- --version
The CrateDB version to use.
- --username
The CrateDB username to use.
- --password
The CrateDB password to use. Minimum 24 characters.
- --subscription-id
The subscription to use for billing of this cluster. Use
free_tierto deploy a free cluster. Runcroud subscriptions listto get the available subscriptions.
Optional Arguments¶
- --unit
The product scale unit to use (0 means 1 node, 1 means 2 nodes, etc). Run
croud products list --kind clusterto get the products available scale units.- -p, --project-id
The project ID to use. We recommend using the org-id instead
- --org-id
The organization ID to use. Defaults to the global configuration value.
- --channel
Possible choices: stable, testing, nightly
The channel of the CrateDB version.
Default:
'stable'- --cpus
CrateDB Edge regions only. Number of CPU cores to allocate. Can be fractional.
- --disks
CrateDB Edge regions only. Number of disks to attach.
- --disk-size-gb
Size of disks to attach (in GiB).
- --disk-type
Possible choices: standard, premium
CrateDB Edge regions only. Type of disks to use.
- --memory-size-mb
CrateDB Edge regions only. Amount of memory to allocate (in MiB).
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters deploy \
--product-name cr1 \
--tier default \
--cluster-name my-first-crate-cluster \
--org-id 952cd102-91c1-4837-962a-12ecb71a6ba8 \
--region aks1.westeurope.azure \
--version 6.2.1 \
--username admin \
--password "8Hed#kd$8^9i4Q#65fT4GKQI" \
--subscription-id 782dfc00-7b25-4f48-8381-b1b096dd1619
==> Info: Cluster creation initiated. It may take a few minutes to complete.
==> Info: Status: REGISTERED (Your creation request was received and is pending processing.)
==> Info: Status: IN_PROGRESS (Cluster creation started. Waiting for the node(s) to be created and creating other required resources.)
==> Success: Operation completed.
+--------------------------------------+------------------------+-----------------------------------------------------------+-----------------------------------------------------------------------+
| id | name | fqdn | url |
|--------------------------------------+------------------------+-----------------------------------------------------------+-----------------------------------------------------------------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | my-first-crate-cluster.aks1.westeurope.azure.cratedb.net. | https://my-first-crate-cluster.aks1.westeurope.azure.cratedb.net:4200 |
+--------------------------------------+------------------------+-----------------------------------------------------------+-----------------------------------------------------------------------+
Deployment of testing/nightly versions¶
For the users that want to get their hands on new features early, it is
possible to deploy versions from our testing and nightly channels.
testing - These are versions that are being evaluated for promotion
to a stable release.
nightly - These are built every night with the latest changes. They
will possibly contain newer features, but they also have potential to be less
stable than testing channel.
Both testing and nightly channel releases are available here.
We want to emphasize the following about testing and nightly channels:
They are for advanced users only.
They are not suitable for production deployments.
It is not possible to switch channels, e.g from
testingtonightly, or fromtestingtostable.
Example¶
sh$ croud clusters deploy
--product-name cr1
--tier default
--cluster-name test-deployment
--project-id bdf523d0-ebc8-4f67-8e15-67d4225a20f9
--version nightly-5.4.0-20230531
--username "admin"
--password "vogRjkY3TR$$P@UvogRjkY3TR$$P@U7vogRjkY3TR$$P@U7"
--subscription-id 7598dc2b-a12e-123b-b776-a5123d4a123d
--channel nightly
--unit 0
clusters scale¶
Note
The --unit argument specifies the total number of nodes desired, rather than
adding to the existing count. For example, if your cluster has three nodes and you
run the croud clusters scale --unit 1 command, the cluster will be scaled
down to two nodes, not up to four.
This command will wait for the cluster scaling to finish or fail.
Scale an existing cluster up or down by changing the number of nodes.
Usage: croud clusters scale [-h] --cluster-id CLUSTER_ID --unit UNIT
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --unit
The product scale unit to use (0 means 1 node, 1 means 2 nodes, etc). Run
croud products list --kind clusterto get the products available scale units.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters scale \
--cluster-id 34813eb4-0a91-443e-af77-33fb91a0b04c \
--unit 1
+--------------------------------------+------------------------+-----------+
| id | name | num_nodes |
|--------------------------------------+------------------------+-----------|
| 34813eb4-0a91-443e-af77-33fb91a0b04c | emerald-taun-we | 1 |
+--------------------------------------+------------------------+-----------+
==> Info: Cluster scaling initiated. It may take a few minutes to complete
the changes.
==> Info: Status: SENT (Your scaling request was sent to the region.)
==> Info: Status: IN_PROGRESS (Scaling up from 1 to 2 nodes. Waiting for new node(s) to be present.)
==> Success: Operation completed.
+--------------------------------------+------------------------+-----------+
| id | name | num_nodes |
|--------------------------------------+------------------------+-----------|
| 34813eb4-0a91-443e-af77-33fb91a0b04c | emerald-taun-we | 2 |
+--------------------------------------+------------------------+-----------+
clusters upgrade¶
Note
This command will wait for the cluster upgrade to finish or fail.
Upgrade an existing CrateDB cluster to a later version.
Usage: croud clusters upgrade [-h] --cluster-id CLUSTER_ID --version VERSION
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --version
The CrateDB version to use.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters upgrade \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--version 4.6.7
+--------------------------------------+------------------------+---------------+
| id | name | crate_version |
|--------------------------------------+------------------------+---------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | 4.6.6 |
+--------------------------------------+------------------------+---------------+
==> Info: Cluster upgrade initiated. It may take a few minutes to complete the changes.
==> Info: Status: SENT (Your upgrade request was sent to the region.)
==> Info: Status: IN_PROGRESS (Waiting for node 1/1 to be terminated...)
==> Info: Status: IN_PROGRESS (Waiting for node 1/1 to be restarted...)
==> Success: Operation completed.
+--------------------------------------+------------------------+---------------+
| id | name | crate_version |
|--------------------------------------+------------------------+---------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | 4.6.7 |
+--------------------------------------+------------------------+---------------+
clusters delete¶
Note
After deleting a cluster, all backups are removed as well, however, you can reach out to our support to have them restore a backup for you within 14 days since the last time a backup was made.
Delete the specified cluster.
Usage: croud clusters delete [-h] --cluster-id CLUSTER_ID [-y]
[--region REGION]
[--output-fmt {table,wide,json,yaml}] [--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
Optional Arguments¶
- -y, --yes
Default:
False- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters delete \
--cluster-id dc40090f-e1df-4974-b751-9fc27c824368
Are you sure you want to delete the cluster? [yN] y
==> Success: Cluster deleted.
clusters restart-node¶
Restart a node in a CrateDB cluster.
Please wait for the node to be restarted before restarting another one. Restarting a node might cause downtime on single-node clusters.
Usage: croud clusters restart-node [-h] --cluster-id CLUSTER_ID --ordinal
ORDINAL [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --ordinal
The ordinal index of the node to restart.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters restart-node \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--ordinal 1
+--------+----------+
| code | status |
|--------+----------|
| 200 | Success |
+--------+----------+
==> Success: Node restarted. It may take a few minutes to complete the changes.
clusters set-deletion-protection¶
Note
This command is only available for organization admins and superusers.
Change the deletion protection status of a cluster.
When deletion protection is enabled, the cluster cannot be deleted until the protection is removed. This can help prevent accidental deletions of clusters.
Usage: croud clusters set-deletion-protection [-h] --cluster-id CLUSTER_ID
--value {True,False}
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --value
Possible choices: True, False
The deletion protection status
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters set-deletion-protection \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--value true
+--------------------------------------+------------------------+----------------------+
| id | name | deletion_protected |
|--------------------------------------+------------------------+----------------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | TRUE |
+--------------------------------------+------------------------+----------------------+
==> Success: Cluster deletion protection status successfully updated
clusters set-ip-whitelist¶
Note
This command will wait for the operation to finish or fail.
Changes the IP Network whitelist of a cluster.
The whitelist is a list of CIDR blocks that are allowed to access the cluster.
When you set a new whitelist, it will overwrite the existing one. If you want to add
or remove CIDR blocks from the existing whitelist, you can first get the current
whitelist with cloud clusters get <cluster_id> command.
Usage: croud clusters set-ip-whitelist [-h] --cluster-id CLUSTER_ID --net NET
[-y] [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --net
IP Network list in CIDR format (comma-separated).
Optional Arguments¶
- -y, --yes
Default:
False- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters set-ip-whitelist \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--net "10.1.2.0/24,192.168.1.0/24"
This will overwrite all existing CIDR restrictions. Continue? [yN] y
+--------------------------------------+------------------------+----------------+
| id | name | ip_whitelist |
|--------------------------------------+------------------------+----------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | NULL |
+--------------------------------------+------------------------+----------------+
==> Info: Updating the IP Network whitelist initiated. It may take a few minutes to complete the changes.
==> Info: Status: SENT (Your update request was sent to the region.)
==> Info: Status: IN_PROGRESS (Updating IP Network Whitelist.)
==> Success: Operation completed.
+--------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
| id | name | ip_whitelist |
|--------------------------------------+------------------------+-------------------------------------------------------------------------------------------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | [{"cidr": "10.1.2.0/24", "description": null}, {"cidr": "192.168.1.0/24", "description": null}] |
+--------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+
clusters expand-storage¶
Note
This command will wait for the operation to finish or fail.
It is only available for organization admins and superusers.
Note that for clusters in Azure regions, any storage increase exceeding a given increment (32, 64, etc.) will be priced at the level of the next increment.
Expand storage of a CrateDB cluster.
Usage: croud clusters expand-storage [-h] --cluster-id CLUSTER_ID
--disk-size-gb DISK_SIZE_GB
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --disk-size-gb
New size of attached disks (in GiB).
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters expand-storage \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--disk-size-gb 512
+--------------------------------------+------------------------+------------------------------------+
| id | name | hardware_specs |
|--------------------------------------+------------------------+------------------------------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | Disk size: 256.0 GiB |
+--------------------------------------+------------------------+------------------------------------+
==> Info: Cluster storage expansion initiated. It may take a few minutes to complete the changes.
==> Info: Status: REGISTERED (Your storage expansion request was received and is pending processing.)
==> Info: Status: SENT (Your storage expansion request was sent to the region.)
==> Info: Status: IN_PROGRESS (Suspending cluster and waiting for Persistent Volume Claim(s) to be resized.)
==> Info: Status: IN_PROGRESS (Starting cluster. Scaling back up to 3 nodes. Waiting for node(s) to be present.)
==> Success: Operation completed.
+--------------------------------------+------------------------+------------------------------------+
| id | name | hardware_specs |
|--------------------------------------+------------------------+------------------------------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | Disk size: 512.0 GiB |
+--------------------------------------+------------------------+------------------------------------+
clusters set-suspended-state¶
Note
This command will wait for the operation to finish or fail.
Suspend or resume a CrateDB cluster.
When a cluster is suspended, it is not running and cannot be accessed, however storage is still retained. This can help save costs when you don’t need to use the cluster for a while. When you want to use the cluster again, you can resume it.
Usage: croud clusters set-suspended-state [-h] --cluster-id CLUSTER_ID --value
{True,False} [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --value
Possible choices: True, False
The suspended status.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters set-suspended-state \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--value true
+--------------------------------------+------------------------+----------------+
| id | name | suspended |
|--------------------------------------+------------------------+----------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | FALSE |
+--------------------------------------+------------------------+----------------+
==> Info: Updating the cluster status initiated. It may take a few minutes to complete the changes.
==> Info: Status: SENT (Your update request was sent to the region.)
==> Info: Status: IN_PROGRESS (Suspending cluster.)
==> Success: Operation completed.
+--------------------------------------+------------------------+----------------+
| id | name | suspended |
|--------------------------------------+------------------------+----------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | TRUE |
+--------------------------------------+------------------------+----------------+
clusters set-product¶
Note
This command will wait for the operation to finish or fail.
It is only available to organization and project admins and superusers.
Change the cluster’s product, which can be used to change the compute (vCPU and RAM) of the cluster.
Usage: croud clusters set-product [-h] --cluster-id CLUSTER_ID --product-name
PRODUCT_NAME [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --product-name
The new product name to use. Run
croud products list --kind clusterto get the list of available products.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ croud clusters set-product \
--cluster-id 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 \
--product-name cr2
+--------------------------------------+------------------------+----------------+
| id | name | product_name |
|--------------------------------------+------------------------+----------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | cr1 |
+--------------------------------------+------------------------+----------------+
==> Info: Changing the cluster product initiated. It may take a few minutes to complete the changes.
==> Info: Status: REGISTERED (Your change compute cluster request was received and is pending processing.)
==> Info: Status: SENT (Your change compute request was sent to the region.)
==> Info: Status: IN_PROGRESS (Waiting for node 1/1 to be terminated...)
==> Info: Status: IN_PROGRESS (Waiting for node 1/1 to be restarted...)
==> Success: Operation completed.
+--------------------------------------+------------------------+----------------+
| id | name | product_name |
|--------------------------------------+------------------------+----------------|
| 8d6a7c3c-61d5-11e9-a639-34e12d2331a1 | my-first-crate-cluster | cr2 |
+--------------------------------------+------------------------+----------------+
clusters set-backup-schedule¶
Note
This command will wait for the operation to finish or fail.
It is only available to organization and project admins and superusers.
Change the cluster’s backup schedule.
More information about the backup schedule can be found in the backup documentation.
Usage: croud clusters set-backup-schedule [-h] --cluster-id CLUSTER_ID
--backup-hours BACKUP_HOURS
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --backup-hours
A list of hours in UTC time that represent when backups will take place along the day. The list must contain at least one value and can have up to 24, comma-separated.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ ❯ croud clusters set-backup-schedule --cluster-id 705a7012-3f89-441d-a10e-b3749d05e993 --backup-hours 2,4,6
+--------------------------------------+------------------------+-------------------+
| id | name | backup_schedule |
|--------------------------------------+------------------------+-------------------|
| 705a7012-3f89-441d-a10e-b3749d05e993 | my-cratedb-cluster | 55 6 * * * |
+--------------------------------------+------------------------+-------------------+
==> Info: Changing the cluster backup schedule. It may take a few minutes to complete the changes.
==> Info: Status: REGISTERED (Your update backup schedule request was received and is pending processing.)
==> Success: Operation completed.
+--------------------------------------+------------------------+-------------------+
| id | name | backup_schedule |
|--------------------------------------+------------------------+-------------------|
| 705a7012-3f89-441d-a10e-b3749d05e993 | my-cratedb-cluster | 55 2,4,6 * * * |
+--------------------------------------+------------------------+-------------------+
clusters snapshots¶
When a backup is created, a snapshot of the cluster is created in the backup repository.
The clusters snapshots command allows you to list and restore these snapshots.
Snapshots are rotated. More information about backups can be found in the backup documentation.
Usage: croud clusters snapshots [-h] {list,restore} ...
clusters snapshots list¶
List all snapshots of a cluster.
List all snapshots of a cluster.
Usage: croud clusters snapshots list [-h] --cluster-id CLUSTER_ID
[--days-ago DAYS_AGO] [--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
Optional Arguments¶
- --days-ago
Number of days to look back. (default: 2)
Default:
2- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ ❯ croud clusters snapshots list --cluster-id 705a7012-3f89-441d-a10e-b3749d05e993
+------------------------+-------------------------------+-------------------+
| created | repository | snapshot |
|------------------------+-------------------------------+-------------------|
| 2022-12-10 12:34:56 | system_backup_20221002123456 | 20221210123456 |
| 2022-12-10 11:34:54 | system_backup_20221002123456 | 20221210113454 |
+------------------------+-------------------------------+-------------------+
clusters snapshots restore¶
Note
This command will wait for the operation to finish or fail.
It is only available to organization and project admins and superusers.
Tip
It is possible to restore a snapshot from a cluster into another cluster. The source and target clusters must be in the same organization and region.
Restore a snapshot of a cluster.
It is possible to partially restore the snapshot by specifying the type of data to restore. For example, you can choose to only restore the data and not the metadata, or just a table.
Usage: croud clusters snapshots restore [-h] --cluster-id CLUSTER_ID
--snapshot SNAPSHOT --repository
REPOSITORY
[--source-cluster-id SOURCE_CLUSTER_ID]
[--type {all,metadata,tables,sections}]
[--tables TABLES]
[--sections SECTIONS]
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster to restore the snapshot into.
- --snapshot
The snapshot to be restored.
- --repository
The repository that contains the snapshot to be restored.
Optional Arguments¶
- --source-cluster-id
The CrateDB cluster where the snapshot was created. It must belong to the same organization and region as the target cluster. If not specified, the
--cluster-idwill be used as both the source and the target.- --type
Possible choices: all, metadata, tables, sections
The type of data to be restored from the snapshot.
- --tables
The list of tables to restore, comma separated. Only valid together with
--type tables.- --sections
The list of data sections to restore, comma separated. Only valid together with
--type sections. Valid sections aretables,views,users,privileges,analyzersorudfs.- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False
Example¶
sh$ ❯ croud clusters snapshots restore --cluster-id 705a7012-3f89-441d-a10e-b3749d05e993 \
--repository system_backup_20221002123456 --snapshot 20221210123456 --type all
==> Info: Restoring the snapshot. Depending on the amount of data you have, this might take a very long time.
==> Success: Operation completed.
+------------------------+-------------------------------+-------------------+
| created | repository | snapshot |
|------------------------+-------------------------------+-------------------|
| 2022-12-10 12:34:56 | system_backup_20221002123456 | 20221210123456 |
+------------------------+-------------------------------+-------------------+
clusters subscription¶
Manage subscription of a CrateDB cluster.
Usage: croud clusters subscription [-h] {update} ...
clusters subscription update¶
Note
This command is only available for superusers.
Not all subscriptions are eligible to have clusters transferred to them. Please refer to internal documentation for more details.
Transfer a CrateDB cluster between subscriptions.
Usage: croud clusters subscription update [-h] --cluster-id CLUSTER_ID
--old-subscription-id
OLD_SUBSCRIPTION_ID
--new-subscription-id
NEW_SUBSCRIPTION_ID
[--region REGION]
[--output-fmt {table,wide,json,yaml}]
[--sudo]
Required Arguments¶
- --cluster-id
The CrateDB cluster ID to use.
- --old-subscription-id
The current subscription ID.
- --new-subscription-id
The ID of the subscription the cluster should be transferred to.
Optional Arguments¶
- --region, -r
Temporarily use the specified region that command will be run in.
- --output-fmt, --format, -o
Possible choices: table, wide, json, yaml
Change the formatting of the output.
- --sudo
Run the given command as superuser.
Default:
False