KastenDR

The DR API group consists of two resources used to initiate a Veeam Kasten Disaster Recovery (KDR) restore operation:

KastenDRReview

KastenDRReview is an API resource used to fetch a list of available Veeam Kasten Disaster Recovery (KDR) restore points for a provided source cluster, from a provided location profile.

This resource provides the ability to track the progress of the operation, report on any errors encountered, and provide details regarding each available KDR restore point. The output is used to determine the id of a specific KDR restore point to be used in defining a KastenDRRestore resource.

Create a KastenDRReview Example

The following example illustrates how to create a KastenDRReview resource. This resource connects to the specified Veeam Kasten location profile and fetches KDR restore point information for the specified source cluster UID.

Creating a KastenDRReview resource assumes the following prerequisites:

Note

To avoid accidental, concurrent requests, only a single instance of a KastenDRReview is allowed to exist.

$ cat > sample-kastendrreview.yaml <<EOF
apiVersion: dr.kio.kasten.io/v1alpha1
kind: KastenDRReview
metadata:
  name: example-kdrreview
  namespace: kasten-io
spec:
  sourceClusterInfo:
    profileName: <Name of Location Profile containing KDR Restore Points>
    sourceClusterID: <Source Cluster UID>
EOF

$ kubectl create -f sample-kastendrreview.yaml
kastendrreview.dr.kio.kasten.io/example-kdrreview created

List KastenDRReviews Example

The following example illustrates listing all KastenDRReviews resources.

The status field provides information about the available KDR restore points, operation progress and any errors.

# list kastendrreviews
$ kubectl get kastendrreviews.dr.kio.kasten.io --namespace kasten-io
NAME                SOURCE CLUSTERID                                 RESTOREPOINTS   PHASE                                     ERROR   STATE
example-kdrreview   9ff3c728-2b8a-4337-8e92-ae9da755f2a8             2               Successfully fetched data from storage            success


# get a specific kastendrreview
$ kubectl get kastendrreviews.dr.kio.kasten.io example-kdrreview -oyaml
  apiVersion: dr.kio.kasten.io/v1alpha1
  kind: KastenDRReview
  metadata:
    creationTimestamp: "2024-10-18T08:03:30Z"
    name: example-kdrreview
    namespace: kasten-io
    resourceVersion: "6"
    uid: 78ab33b0-3026-4392-bf9f-ab042206fd10
  spec:
    sourceClusterInfo:
      profileName: sample-prof
      sourceClusterID: 9ff3c728-2b8a-4337-8e92-ae9da755f2a8
  status:
    restorePoints:
      count: 2
      restorePointList:
      - version: v3
        createdTime: "2024-10-18T09:03:30Z"
        id: 1ff3c798-3b8a-4734-8b62-dc9da753f2a8
        localSnapshotTaken: true
        validSnapshotAvailable: true
      - version: v3
        createdTime: "2024-10-18T08:30:45Z"
        id: 8af3c729-2b8a-8337-6b92-be9da790f2a7
        localSnapshotTaken: true
        validSnapshotAvailable: false
    state: success
    phase: Successfully fetched data from storage

Delete KastenDRReview Example

KastenDRReview API resources can be deleted. Functionally, this only serves to clean up the API representation; no restore point data will be deleted.

# delete kastendrreview 'example-kdrreview' in namespace 'kasten-io'
$ kubectl delete kastendrreviews.dr.kio.kasten.io example-kdrreview --namespace kasten-io
kastendrreviews.dr.kio.kasten.io "example-kdrreview" deleted

KastenDRReview API Type

The following is a complete specification of the KastenDRReview resource.

# Standard Kubernetes API Version declaration. Required.
apiVersion: dr.kio.kasten.io/v1alpha1
# Standard Kubernetes Kind declaration. Required.
kind: KastenDRReview
# Standard Kubernetes metadata. Required.
metadata:
  # Name of the KastenDRReview. Required.
  name: example-drreview
  # Namespace of the KastenDRReview. Required.
  namespace: kasten-io
# Spec of the KastenDRReview.
spec:
  # SourceClusterInfo provides the source cluster details for disaster recovery.
  sourceClusterInfo:
    # Unique identifier of the source cluster.
    sourceClusterID: <clusterID>
    # Name of the location profile associated with the KDR policy on the source cluster.
    profileName: <profileName>
    # Point in time for the KDR review (optional).
    # Can be specified for immutable location profiles in
    # the event of attempted direct deletion from the repository
    pointInTime: "2023-11-06T00:00:00Z"
# Status of the KastenDRReview.
status:
  # The current state of the disaster recovery operation.
  state: [none | running | failed | success]
  # The list of restore points for the disaster recovery process.
  restorePoints:
    count: 2
    restorePointList:
      - # First restore point information.
        # KDR version of the snapshot
        # v3 refers to "Quick DR" (the default configuration as of v7.5)
        # v2 refers to "Full DR" (the legacy option to perform full dumps of the Veeam Kasten catalog)
        version: "v3"
        creationTime: "2023-11-01T12:00:00Z"
        # Restore point ID to be referenced in a KastenDRRestore
        # to select a specific KDR restore point
        id: 1ff3c798-3b8a-4734-8b62-dc9da753f2a8
        # For "Quick DR" configuration of Veeam Kasten Disaster Recovery,
        # indicates that a local storage snapshot of the catalog PVC was taken
        localSnapshotTaken: true
        # For "Quick DR" configuration of Veeam Kasten Disaster Recovery,
        # indicates that the associated local snapshot is available and will
        # be restored as part of the KDR restore point
        validSnapshotAvailable: true
      - # Second restore point information.
        version: "v2"
        creationTime: "2023-11-02T12:00:00Z"
        id: 1ff3c798-3b8a-4734-8b62-dc9da753f4f5
        localSnapshotTaken: false
        validSnapshotAvailable: false
  # Error details, if any, encountered during the KDR review process.
  error: ""
  # Additional cause of the error, if applicable.
  cause: ""
  # Current running phase of the disaster recovery review.
  phase: ""

KastenDRRestore

KastenDRRestore is an API resource used to manage and track Veeam Kasten Disaster Recovery (KDR) restore operations.

This resource allows users to:

  • Initiate a KDR restore operation from the latest KDR restore point

  • Initiate a KDR restore operation from a specific restore point provided by the KastenDRReview process.

  • Specify which resources to skip during the restore process (e.g., secrets, profiles).

  • Monitor the status of the restore operation, including error information, cause and the phase of the operation.

Create a KastenDRRestore Example

The following examples illustrate how to create a KastenDRRestore resource.

Creating a KastenDRRestore resource assumes the following prerequisites:

Note

To avoid accidental, concurrent requests, only a single instance of a KastenDRRestore is allowed to exist.

Use Latest KDR Restore Point

The following example fetches all KDR restore points for the referenced source cluster and restores the latest available as of the specified point in time. This method can be used without first creating a KastenDRReview.

Note

The pointInTime parameter is optional and can only be used for review and restore operations from an immutable location profile.

$ cat > sample-kastendrrestore.yaml <<EOF
apiVersion: dr.kio.kasten.io/v1alpha1
kind: KastenDRRestore
metadata:
  name: sample-kdrrestore
  namespace: kasten-io
spec:
  sourceClusterInfo:
      profileName: <Name of Location Profile containing KDR restore points>
      sourceClusterID: <Source Cluster UID>
      pointInTime: "2024-10-08T04:00:33Z"
EOF
kastendrrrestore.dr.kio.kasten.io/sample-kdrrestore created

Use Specific KDR Restore Point

The following example restores using a specific KDR restore point (id), from an existing KastenDRReview resource (kastenDRReviewRef).

$ cat > sample-kastendrrestore.yaml <<EOF
apiVersion: dr.kio.kasten.io/v1alpha1
kind: KastenDRRestore
metadata:
  name: sample-kdrrestore
  namespace: kasten-io
spec:
  kastenDRReviewDetails:
    kastenDRReviewRef:
    name: <KastenDRReview Name>
    namespace: kasten-io
    id: <KDR Restore Point ID from KastenDRReview RestorePointList>
EOF
kastendrrrestore.dr.kio.kasten.io/sample-kdrrestore created

List KastenDRRestore Example

The following example illustrates listing all KastenDRRestore resources in a namespace. The phase column indicates the various step through which restore operation is progressing.

# list kastendrrestores
$ kubectl get kastendrrestores.dr.kio.kasten.io --namespace kasten-io
NAME                SOURCECLUSTERID                                 PHASE                                   STATE   ERROR
example-kdrrestore  2ff3c728-2b9a-4337-5e34-ae9da766f2a5            Importing application restore points    running


# get a specific kastendrrestore
$ kubectl get kastendrrestores.dr.kio.kasten.io example-kdrrestore -oyaml
  apiVersion: dr.kio.kasten.io/v1alpha1
  kind: KastenDRRestore
  metadata:
    creationTimestamp: "2024-10-18T08:03:30Z"
    name: example-kdrrestore
    namespace: kasten-io
    resourceVersion: "6"
    uid: 78ab33b0-3026-4392-bf9f-ab042206fd10
  spec:
    profileName: sample-prof
    sourceClusterID: 7708b583-13d8-4104-8af3-57d1ac70f23e
    pointInTime: "2024-10-08T04:00:33Z"
  status:
    state: success
    phase: Successfully restored resources

Delete KastenDRRestore Example

KastenDRRestore API resources can be deleted. Functionally, this only serves to clean up the API representation.

# delete kastendrrestore 'example-kdrrestore' in namespace 'kasten-io'
$ kubectl delete kastendrrestores.dr.kio.kasten.io example-kdrrestore --namespace kasten-io
kastendrrestores.dr.kio.kasten.io "example-kdrrestore" deleted

KastenDRRestore API Type

The following is a complete specification of the KastenDRRestore resource.

# Standard Kubernetes API Version declaration. Required.
apiVersion: dr.kio.kasten.io/v1alpha1
# Standard Kubernetes Kind declaration. Required.
kind: KastenDRRestore
# Standard Kubernetes metadata. Required.
metadata:
  # Name of the KastenDRRestore. Required.
  name: example-drrestore
  # Namespace of the KastenDRRestore. Required.
  namespace: kasten-io
# Spec of the KastenDRRestore.
spec:
  # KastenDRReviewDetails holds the reference to the associated KastenDRReview.
  kastenDRReviewDetails:
    # The NamespacedName reference to the KastenDRReview resource.
    kastenDRReviewRef:
      # The name of the KastenDRReview resource.
      name: example-drreview
      # The namespace of the KastenDRReview resource.
      namespace: kasten-io
    # Unique identifier of the KDR restore point selected for restore operation.
    id: 78ab33b0-3026-4392-bf9f-ab042206fd10
  # SourceClusterInfo provides the source cluster details for disaster recovery.
  sourceClusterInfo:
    # Unique identifier of the source cluster.
    sourceClusterID: 7708b583-13d8-4104-8af3-57d1ac70f23e
    # Name of the location profile associated with the KDR policy on the source cluster.
    profileName: sample-profile
    # Point in time for the KDR review (optional).
    # Can be specified for immutable location profiles in
    # the event of attempted direct deletion from the repository
    pointInTime: "2023-11-06T00:00:00Z"
  # SkipResources specifies resources to skip during restore operation (optional).
  skipResources: "secrets,profiles"
# Status of the KastenDRRestore.
status:
  # The current state of the disaster recovery restore operation.
  state: [none | running | failed | success]
  # Error details, if any, encountered during the restore process.
  error: ""
  # Additional cause of the error, if applicable.
  cause: ""
  # Current running phase of the disaster recovery restore process.
  phase: ""