Converting a Secondary Cluster to Standalone

Remove a secondary cluster from a cross-region replication relationship and convert it to a standalone cluster.

When you convert a secondary cluster to standalone, replication from the primary cluster stops. The secondary cluster is removed from the cross-region replication relationship and becomes a standalone cluster that accepts both read and write operations.

Use this operation to end a cross-region replication relationship or to make the secondary cluster writable when the primary region is unavailable. The primary cluster doesn't need to be available.

Note

After you convert the cluster to standalone, the replicated data remains on the cluster, but it no longer receives changes from the former primary cluster.
    1. On the Clusters list page, select the secondary cluster that you want to convert. If you need help finding the list page or the cluster, see Listing OCI Cache Clusters.
    2. On the cluster details page, select Actions, and then select Convert role to standalone.
    3. To confirm the conversion, select Update.

    After the operation completes, the cluster has the Standalone role, accepts read and write operations, and retains the data that was replicated before the conversion. The cluster is no longer part of a cross-region replication relationship.

    Note

    In a disaster recovery scenario, redirect application traffic to the standalone cluster.

    Confirm the following to verify the conversion:

    • The cluster has the Standalone role.
    • The cluster accepts read and write operations.
    • The former primary cluster is no longer associated with the converted cluster.

    In a disaster recovery scenario, update the application to use the standalone cluster endpoint.

    If you performed this operation because the primary region was unavailable, establish a new cross-region replication relationship after the region becomes available again. The previous replication relationship isn't restored automatically.

  • Use the oci redis redis-cluster redis-cluster convert-to-standalone-cluster command with the required parameters to convert a secondary cluster into a standalone cluster. The cluster then operates independently.

    oci redis redis-cluster redis-cluster convert-to-standalone-cluster --redis-cluster-id <redis-cluster_OCID> [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ConvertToStandaloneCluster operation to convert a secondary cluster into a standalone cluster.

  • To convert a secondary cluster into a standalone cluster, remove the primary_cluster_id parameter from the resource configuration. After you remove the parameter, run the terraform plan and apply commands.

    Sample Terraform Configuration

    resource "oci_redis_redis_cluster" "test_redis_cluster" {
    	#Required
        compartment_id = var.compartment_id
        display_name = var.redis_cluster_display_name
        node_count = var.redis_cluster_node_count
        node_memory_in_gbs = var.redis_cluster_node_memory_in_gbs
        software_version = var.redis_cluster_software_version
        subnet_id = oci_core_subnet.test_subnet.id
    
        #Optional
        
        # Remove the primary_cluster_id parameter from the resource configuration.
        [....]
    }