Backing up applications with Restic
If your cloud provider does not support snapshots or if your applications are on NFS data volumes, you can create backups by using Restic.
Restic is installed by the OADP Operator by default. |
Restic integration with OADP provides a solution for backing up and restoring almost any type of Kubernetes volume. This integration is an addition to OADP’s capabilities, not a replacement for existing functionality.
You back up Kubernetes resources, internal images, and persistent volumes with Restic by editing the Backup
custom resource (CR).
You do not need to specify a snapshot location in the DataProtectionApplication
CR.
Restic does not support backing up |
Prerequisites
You must install the OpenShift API for Data Protection (OADP) Operator.
You must not disable the default Restic installation by setting
spec.configuration.restic.enable
tofalse
in theDataProtectionApplication
CR.The
DataProtectionApplication
CR must be in aReady
state.
Procedure
Create the
Backup
CR, as in the following example:apiVersion: velero.io/v1
kind: Backup
metadata:
name: <backup>
labels:
velero.io/storage-location: default
namespace: openshift-adp
spec:
defaultVolumesToFsBackup: true (1)
...
1 In OADP version 1.2 and later, add the defaultVolumesToFsBackup: true
setting within thespec
block. In OADP version 1.1, adddefaultVolumesToRestic: true
.