5.26.10.3. Using the DataProtectionTest custom resource


Configure and run the DataProtectionTest (DPT) custom resource (CR) to verify Container Storage Interface (CSI) snapshot readiness and data upload performance to your storage bucket. This helps you validate your OADP environment before performing backup and restore operations.

Prerequisites

  • You have logged in to the OpenShift Container Platform cluster as a user with the cluster-admin role.
  • You have installed the OpenShift CLI (oc).
  • You have installed the OADP Operator.
  • You have created the DataProtectionApplication (DPA) CR.
  • You have configured a backup storage location (BSL) to store the backups.
  • You have an application with persistent volume claims (PVCs) running in a separate namespace.

Procedure

  1. Create a manifest file for the DPT CR as shown in the example:

    apiVersion: oadp.openshift.io/v1alpha1
    kind: DataProtectionTest
    metadata:
      name: dpt-sample
      namespace: openshift-adp
    spec:
      backupLocationName: <bsl_name>
      csiVolumeSnapshotTestConfigs:
      - snapshotClassName: csi-gce-pd-vsc
        timeout: 90s
        volumeSnapshotSource:
          persistentVolumeClaimName: <pvc1_name>
          persistentVolumeClaimNamespace: <pvc_namespace>
      - snapshotClassName: csi-gce-pd-vsc
        timeout: 120s
        volumeSnapshotSource:
          persistentVolumeClaimName: <pvc2_name>
          persistentVolumeClaimNamespace: <pvc_namespace>
      forceRun: false
      uploadSpeedTestConfig:
        fileSize: 200MB
        timeout: 120s

    where:

    <bsl_name>
    Specifies the name of the BSL.
    csiVolumeSnapshotTestConfigs
    Specifies a list for csiVolumeSnapshotTestConfigs. In this example, two PVCs are being tested.
    <pvc1_name>
    Specifies the name of the first PVC.
    <pvc_namespace>
    Specifies the namespace of the PVC.
    <pvc2_name>
    Specifies the name of the second PVC.
    forceRun
    Set to false if you want to make the OADP controller skip re-running tests.
    uploadSpeedTestConfig
    Configures the upload speed test by setting the fileSize and timeout fields.
  2. Create the DPT CR by running the following command:

    $ oc create -f <dpt_file_name>

    Replace <dpt_file_name> with the file name of the DPT manifest.

Verification

  1. Verify that the phase of the DPT CR is Complete by running the following command:

    $ oc get dpt dpt-sample

    The example output is as following:

    NAME         PHASE      LASTTESTED   UPLOADSPEED(MBPS)   ENCRYPTION   VERSIONING   SNAPSHOTS    AGE
    dpt-sample   Complete   17m          546                 AES256       Enabled      2/2 passed   17m
  2. Verify that the CSI snapshots are ready and the data upload tests are successful by running the following command:

    $ oc get dpt dpt-sample -o yaml

    The example output is as following:

    apiVersion: oadp.openshift.io/v1alpha1
    kind: DataProtectionTest
    ....
    status:
      bucketMetadata:
        encryptionAlgorithm: AES256
        versioningStatus: Enabled
      lastTested: "202...:47:51Z"
      phase: Complete
      s3Vendor: AWS
      snapshotSummary: 2/2 passed
      snapshotTests:
      - persistentVolumeClaimName: mysql-data
        persistentVolumeClaimNamespace: ocp-mysql
        readyDuration: 24s
        status: Ready
      - persistentVolumeClaimName: mysql-data1
        persistentVolumeClaimNamespace: ocp-mysql
        readyDuration: 40s
        status: Ready
      uploadTest:
        duration: 3.071s
        speedMbps: 546
        success: true

    where:

    bucketMetadata
    Specifies the bucket metadata information.
    s3Vendor
    Specifies the S3 bucket vendor.
    snapshotSummary
    Specifies the summary of the CSI snapshot tests.
    uploadTest
    Specifies the upload test details.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동