crdb-cli crdb add-instance
Adds a peer replica to an Active-Active database.
| Redis Software |
|---|
Adds a peer replica to an existing Active-Active database in order to host the database on another cluster. This creates an additional active instance of the database on the specified cluster.
crdb-cli crdb add-instance --crdb-guid <guid>
--instance fqdn=<cluster_fqdn>,{ username=<username>,password=<password> | client_cert=<cert>,client_key=<key>[,trusted_ca=<ca>] }[,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname>]
[--compression <0-6>]
[--wait | --no-wait]
Parameters
| Parameter | Value | Description |
|---|---|---|
| crdb-guid | string | The GUID of the database (required) |
| instance fqdn=<cluster_fqdn>,username=<username>,password=<password>,url=https://<hostname-or-IP>:9443,replication_endpoint=<hostname-or-IP>:<port>,replication_tls_sni=<hostname> | strings | The connection information for the new participating cluster (required) Required: • fqdn - Cluster fully qualified domain name• Either a username and password, or certificate credentials: - username and password - Cluster username and password- client_cert and client_key - Client certificate and its private key, as PEM stringsDon't provide both for the same cluster. The command fails with Use either username/password or client_cert/client_key/trusted_ca, not both.Optional: • trusted_ca - CA that validates the API certificate the peer cluster presents, as a PEM string. Only valid with certificate credentials. If you omit it, the cluster uses the certificates in its mtls_trusted_ca.pem file.• url - URL to access the cluster's REST API• replication_endpoint - Address to access the database instance for peer replication• replication_tls_sni - Cluster Server Name Indication (SNI) hostname for TLS connectionsSee Certificate-based authentication for cluster management. |
| compression | 0-6 | The level of data compression: 0 = No compression 6 = High compression and resource load (Default: 3) |
| wait | Prevents crdb-cli from running another command before this command finishes |
|
| no-wait | crdb-cli can run another command before this command finishes |
Returns
Returns the task ID of the task that is adding the new instance.
If --no-wait is specified, the command exits. Otherwise, it will wait for the instance to be added and return finished.
Example
$ crdb-cli crdb add-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 \
--instance fqdn=cluster2.redis.local,username=[email protected],password=admin-password
Task f809fae7-8e26-4c8f-9955-b74dbbd47949 created
---> Status changed: queued -> started
---> Status changed: started -> finished