This is a cache of https://docs.okd.io/4.16/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.html. It is a snapshot of the page at 2026-05-24T03:33:14.524+0000.
Backing up applications - OADP Application backup and restore | Backup and restore | OKD 4.16
×

Back up applications by creating a Backup custom resource (CR) using snapshots, CSI, or File System Backup with Kopia or Restic.

Frequent backups might consume storage on the backup storage location. Check the frequency of backups, retention time, and the amount of data of the persistent volumes (PVs) if using non-local backups, for example, S3 buckets. Because all backups are retained until they expire, check the time to live (TTL) setting of the schedule.

Review the following information regarding backing up applications by using OADP:

  • The Backup CR creates backup files for Kubernetes resources and internal images on S3 object storage.

  • If you use Velero’s snapshot feature to back up data stored on the persistent volume, only snapshot related information is stored in the S3 bucket along with the OpenShift object data.

  • If your cloud provider has a native snapshot api or supports CSI snapshots, the Backup CR backs up persistent volumes (PVs) by creating snapshots. For more information about working with CSI snapshots, see Backing up persistent volumes with CSI snapshots. For more information about CSI volume snapshots, see CSI volume snapshots.

  • If the underlying storage or the backup bucket are part of the same cluster, then the data might be lost in case of disaster. Ensure you configure your backup storage off-cluster.

  • If your cloud provider does not support snapshots or if your applications are on NFS data volumes, you can create backups by using Kopia or Restic. See Backing up applications with File System Backup: Kopia or Restic.

  • You can create backup hooks to run commands before or after the backup operation. See Creating backup hooks.

  • You can schedule backups by creating a Schedule CR instead of a Backup CR. See Scheduling backups using Schedule CR.

  • OKD 4.16 enforces a pod security admission (PSA) policy that can hinder the readiness of pods during a Restic restore process.

    This issue has been resolved in the OADP 1.1.6 and OADP 1.2.2 releases, therefore it is recommended that users upgrade to these releases.

    For more information, see Restic restore partially failing on Red Hat OKD 4.15 due to changed PSA policy.

The OpenShift api for Data Protection (OADP) does not support backing up volume snapshots that were created by other software.

The …​/.snapshot directory is a snapshot copy directory, which is used by several NFS servers. This directory has read-only access by default, so Velero cannot restore to this directory.

Do not give Velero write access to the .snapshot directory, and disable client access to this directory.

Previewing resources before running backup and restore

Preview the backup and restore resources in advance by doing a dry run of the backup and restore operations. This helps you to verify which resources will be included before committing to a full backup or restore.

OADP backs up application resources based on the type, namespace, or label. This means that you can view the resources after the backup is complete. Similarly, you can view the restored objects based on the namespace, persistent volume (PV), or label after a restore operation is complete.

Prerequisites
  • You have installed the OADP Operator.

Procedure
  1. To preview the resources included in the backup before running the actual backup, run the following command:

    $ velero backup create <backup-name> --snapshot-volumes false

    Specify the value of --snapshot-volumes parameter as false.

  2. To know more details about the backup resources, run the following command:

    $ velero describe backup <backup_name> --details

    Replace <backup_name> with the name of the backup.

  3. To preview the resources included in the restore before running the actual restore, run the following command:

    $ velero restore create --from-backup <backup_name>

    Replace <backup_name> with the name of the backup.

    The velero restore create command creates restore resources in the cluster. You must delete the resources created as part of the restore, after you review the resources.

  4. To know more details about the restore resources, run the following command:

    $ velero describe restore <restore_name> --details

    Replace <restore_name> with the name of the restore.