Back to Redis

Remove Instance

content/operate/rs/references/cli-utilities/crdb-cli/crdb/remove-instance.md

latest1.8 KB
Original Source

Removes a peer replica instance from the Active-Active database and deletes the instance and its data from the participating cluster.

sh
crdb-cli crdb remove-instance --crdb-guid <guid>
         --instance-id <instance-id>
         [ --force ]
         [ --no-wait ]

If the cluster cannot communicate with the instance that you want to remove, you can:

  1. Use the --force option to remove the instance from the Active-Active database without purging the data from the instance.

  2. Run [crdb-cli crdb purge-instance]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) from the removed instance to delete the Active-Active database and its data.

Parameters

ParameterValueDescription
crdb-guidstringThe GUID of the database (required)
instance-idstringThe ID of the local instance to remove (required)
forceRemoves the instance without purging data from the instance.
If --force is specified, you must run [crdb-cli crdb purge-instance]({{< relref "/operate/rs/references/cli-utilities/crdb-cli/crdb/purge-instance" >}}) from the removed instance.
no-waitDoes not wait for the task to complete

Returns

Returns the task ID of the task that is deleting the instance.

If --no-wait is specified, the command exits. Otherwise, it will wait for the instance to be removed and return finished.

Example

sh
$ crdb-cli crdb remove-instance --crdb-guid db6365b5-8aca-4055-95d8-7eb0105c0b35 --instance-id 2 --force
Task b1eba5ba-90de-49e9-8678-d66daa1afb51 created
  ---> Status changed: queued -> started
  ---> Status changed: started -> finished