Swapping and Resynchronizing a TrueCopy pair or Universal Replicator pair using the DR Operator

Replication Plug-in for Containers Installation and User Guide

Version
3.18.x
Audience
anonymous
Part Number
MK-92ADPTR155-10
ft:lastEdition
2026-07-07

Swapping and resynchronizing a TrueCopy or Universal Replicator pair using the DR Operator reverses the primary and secondary roles and restores data synchronization, ensuring both volumes are consistent after a failover or maintenance operation.

  • Verify that the VMs are powered-off before you perform the swap and resync operation.
  • Verify that the secondary site is up and running.
Note: This operation is not supported for Universal Replicator pair when multiple replication pairs are created using the same Journal ID.
  1. Apply the DR policy with desiredState set to swap-resync. Enter:
    kubectl patch drpolicy <drpolicy-cr-name> --type=merge -p '{"spec":{"desiredState":"swap-resync"}}
  2. Verify if the DR policy is applied on both the primary and secondary sites. Enter:
     kubectl get drpolicy
    Sample output:
    kubectl get drpolicy
    NAME                  SOURCE_CLUSTER   TARGET_CLUSTER   REPLICATION_TYPE   DESIRED_STATE   STATUS      CTG_ID   AGE
    sample-app-drpolicy   site-61          site-62          sync               swap-resync     Unhealthy   21       25m
  3. Verify the replication status of the PVCs. Enter:
    kubectl get replication -A
    Sample output:
    NAMESPACE   NAME                                                 STATUS     DESIREDSTATE   OPERATION     AGE
             demo-app    replication--apps-1-drpolicy-sync--demo-server-pvc    Pair      swap-resync    swap-resync   25m
             demo-app    replication--apps-1-drpolicy-sync--demo-ui-pvc        Pair      swap-resync    swap-resync   25m
             demo-db     replication--apps-1-drpolicy-sync--demo-db-pvc        Pair      swap-resync    swap-resync   25m
    You must also verify the replication status on the primary site.