Skip to main content
Version: 3.2

Clean up disaster recovery objects

Summary and Key concepts

Summary

This article explains how to delete a disaster recovery (DR) setup in a Portworx environment. It includes steps to remove the migrationschedule object, associated migration objects, schedule policies, and the ClusterPair object from the source cluster. After deleting the migration schedule, additional migration objects linked to it should also be removed. Platform-specific commands using kubectl or oc are provided to manage these deletions effectively, depending on the Kubernetes environment.

Kubernetes Concepts

  • Namespaces: Used here to specify the namespace where DR objects like migrationschedule and ClusterPair reside and from which they are deleted.
  • SchedulePolicy: In this context, the schedulepolicy object is associated with migration scheduling, and this guide includes steps for deleting the policy when the DR setup is no longer needed.

Portworx Concepts

  • MigrationSchedule: A Portworx object used to automate periodic migrations; deleting it involves additional steps to remove related migration objects.

  • ClusterPair: Represents the DR relationship between clusters, which is deleted from the source cluster to dismantle the DR configuration.

If you no longer require a disaster recovery object, you can delete it.

Perform the following steps from a location where you have kubectl access to the source cluster:

  1. Delete the migration schedule:
    kubectl delete migrationschedules <migrationschedule-name> -n <migrationnamespace>

note

Once a migrationschedule object is deleted, delete all the associated migration objects that you retrieved in step 2 of the previous section.

  1. Delete the associated schedule policy :

    kubectl delete schedulepolicy <your-schedule-policy>
  2. Delete the cluster pair from the source cluster.

    kubectl delete clusterpair <migration-cluster-pair> -n <migrationnamespace>