You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You back up applications by creating a `Backup` custom resource (CR). See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-creating-backup-cr_backing-up-applications[Creating a Backup CR].
10
+
You back up applications by creating a `Backup` custom resource (CR). See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-cr.adoc#oadp-creating-backup-cr-doc[Creating a Backup CR].
11
11
12
12
The `Backup` CR creates backup files for Kubernetes resources and internal images, on S3 object storage, and snapshots for persistent volumes (PVs), if the cloud provider uses a native snapshot API or the Container Storage Interface (CSI) to create snapshots, such as {rh-storage} 4.
13
13
@@ -16,124 +16,36 @@ For more information about CSI volume snapshots, see xref:../../../storage/conta
16
16
:FeatureName: The `CloudStorage` API for S3 storage
17
17
include::snippets/technology-preview.adoc[]
18
18
19
-
* 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 xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-backing-up-pvs-csi_backing-up-applications[Backing up persistent volumes with CSI snapshots].
19
+
* 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 xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc#oadp-backing-up-pvs-csi-doc[Backing up persistent volumes with CSI snapshots].
20
20
21
-
* If your cloud provider does not support snapshots or if your applications are on NFS data volumes, you can create backups by using Restic. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-backing-up-applications-restic_backing-up-applications[Backing up applications with Restic].
21
+
* If your cloud provider does not support snapshots or if your applications are on NFS data volumes, you can create backups by using Restic. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc#oadp-backing-up-applications-restic-doc[Backing up applications with Restic].
22
22
23
23
[IMPORTANT]
24
24
====
25
25
The {oadp-first} does not support backing up volume snapshots that were created by other software.
26
26
====
27
27
28
-
You can create backup hooks to run commands before or after the backup operation. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-creating-backup-hooks_backing-up-applications[Creating backup hooks].
28
+
You can create backup hooks to run commands before or after the backup operation. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc#backing-up-applications[Creating backup hooks].
29
29
30
-
You can schedule backups by creating a `Schedule` CR instead of a `Backup` CR. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-scheduling-backups_backing-up-applications[Scheduling backups].
30
+
You can schedule backups by creating a `Schedule` CR instead of a `Backup` CR. See xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc#backing-up-applications[Scheduling backups].
{ocp} 4.14 enforces a pod security admission (PSA) policy that can hinder the readiness of pods during a Restic restore process.
39
40
40
-
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.
41
+
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.
41
42
42
43
For more information, see xref:../../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#oadp-restic-restore-failing-psa-policy_oadp-troubleshooting[Restic restore partially failing on OCP 4.14 due to changed PSA policy].
You can use OADP 1.2 Data Mover to backup and restore application data for clusters that use CephFS, CephRBD, or both.
50
-
51
-
OADP 1.2 Data Mover leverages Ceph features that support large-scale environments. One of these is the shallow copy method, which is available for {product-title} 4.12 and later. This feature supports backing up and restoring `StorageClass` and `AccessMode` resources other than what is found on the source persistent volume claim (PVC).
52
-
53
-
[IMPORTANT]
54
-
====
55
-
The CephFS shallow copy feature is a back up feature. It is not part of restore operations.
=== Defining custom resources for use with OADP 1.2 Data Mover
62
-
63
-
When you install {rh-storage-first}, it automatically creates default CephFS and a CephRBD `StorageClass` and `VolumeSnapshotClass` custom resources (CRs). You must define these CRs for use with OpenShift API for Data Protection (OADP) 1.2 Data Mover.
64
-
65
-
After you define the CRs, you must make several other changes to your environment before you can perform your back up and restore operations.
=== Backing up and restoring data using OADP 1.2 Data Mover and CephFS storage
73
-
74
-
You can use OpenShift API for Data Protection (OADP) 1.2 Data Mover to back up and restore data using CephFS storage by enabling the shallow copy feature of CephFS.
=== Backing up and restoring data using OADP 1.2 Data Mover and split volumes (CephFS and Ceph RBD)
88
-
89
-
You can use OpenShift API for Data Protection (OADP) 1.2 Data Mover to back up and restore data in an environment that has _split volumes_, that is, an environment that uses both CephFS and CephRBD.
OADP 1.1 Data Mover might leave cluster resources whether or not it successfully backs up your container storage interface (CSI) volume snapshots to a remote object store.
* xref:../../../operators/admin/olm-adding-operators-to-cluster.adoc#olm-installing-operators-from-operatorhub_olm-adding-operators-to-a-cluster[Installing Operators on clusters for administrators]
131
48
* xref:../../../operators/user/olm-installing-operators-in-namespace.adoc#olm-installing-operators-in-namespace[Installing Operators in namespaces for non-administrators]
If your cloud provider does not support snapshots or if your applications are on NFS data volumes, you can create backups by using Restic.
11
+
12
+
[NOTE]
13
+
====
14
+
link:https://restic.net/[Restic] is installed by the OADP Operator by default.
15
+
====
16
+
17
+
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.
18
+
19
+
You back up Kubernetes resources, internal images, and persistent volumes with Restic by editing the `Backup` custom resource (CR).
20
+
21
+
You do not need to specify a snapshot location in the `DataProtectionApplication` CR.
22
+
23
+
[IMPORTANT]
24
+
====
25
+
Restic does not support backing up `hostPath` volumes. For more information, see link:https://{velero-domain}/docs/v{velero-version}/restic/#limitations[additional Restic limitations].
26
+
====
27
+
28
+
.Prerequisites
29
+
30
+
* You must install the OpenShift API for Data Protection (OADP) Operator.
31
+
* You must not disable the default Restic installation by setting `spec.configuration.restic.enable` to `false` in the `DataProtectionApplication` CR.
32
+
* The `DataProtectionApplication` CR must be in a `Ready` state.
33
+
34
+
.Procedure
35
+
36
+
* Create the `Backup` CR, as in the following example:
37
+
+
38
+
[source,yaml]
39
+
----
40
+
apiVersion: velero.io/v1
41
+
kind: Backup
42
+
metadata:
43
+
name: <backup>
44
+
labels:
45
+
velero.io/storage-location: default
46
+
namespace: openshift-adp
47
+
spec:
48
+
defaultVolumesToRestic: true <1>
49
+
...
50
+
----
51
+
<1> Add `defaultVolumesToRestic: true` to the `spec` block.
= Backing up persistent volumes with CSI snapshots
8
+
include::_attributes/common-attributes.adoc[]
9
+
:context: backing-up-applications
10
+
11
+
toc::[]
12
+
13
+
You back up persistent volumes with Container Storage Interface (CSI) snapshots by editing the `VolumeSnapshotClass` custom resource (CR) of the cloud storage before you create the `Backup` CR, see xref:../../../storage/container_storage_interface/persistent-storage-csi-snapshots.adoc#persistent-storage-csi-snapshots-overview_persistent-storage-csi-snapshots[CSI volume snapshots].
14
+
15
+
For more information see xref:../..xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-cr.adoc#oadp-creating-backup-cr-doc[Creating a Backup CR].
16
+
17
+
.Prerequisites
18
+
19
+
* The cloud provider must support CSI snapshots.
20
+
* You must enable CSI in the `DataProtectionApplication` CR.
21
+
22
+
.Procedure
23
+
24
+
* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
You back up Kubernetes images, internal images, and persistent volumes (PVs) by creating a `Backup` custom resource (CR).
15
+
16
+
.Prerequisites
17
+
18
+
* You must install the OpenShift API for Data Protection (OADP) Operator.
19
+
* The `DataProtectionApplication` CR must be in a `Ready` state.
20
+
* Backup location prerequisites:
21
+
** You must have S3 object storage configured for Velero.
22
+
** You must have a backup location configured in the `DataProtectionApplication` CR.
23
+
* Snapshot location prerequisites:
24
+
** Your cloud provider must have a native snapshot API or support Container Storage Interface (CSI) snapshots.
25
+
** For CSI snapshots, you must create a `VolumeSnapshotClass` CR to register the CSI driver.
26
+
** You must have a volume location configured in the `DataProtectionApplication` CR.
27
+
28
+
.Procedure
29
+
30
+
. Retrieve the `backupStorageLocations` CRs by entering the following command:
31
+
32
+
+
33
+
[source,terminal]
34
+
----
35
+
$ oc get backupStorageLocations -n openshift-adp
36
+
----
37
+
+
38
+
.Example output
39
+
+
40
+
[source,terminal]
41
+
----
42
+
NAMESPACE NAME PHASE LAST VALIDATED AGE DEFAULT
43
+
openshift-adp velero-sample-1 Available 11s 31m
44
+
----
45
+
46
+
. Create a `Backup` CR, as in the following example:
47
+
+
48
+
[source,yaml]
49
+
----
50
+
apiVersion: velero.io/v1
51
+
kind: Backup
52
+
metadata:
53
+
name: <backup>
54
+
labels:
55
+
velero.io/storage-location: default
56
+
namespace: openshift-adp
57
+
spec:
58
+
hooks: {}
59
+
includedNamespaces:
60
+
- <namespace> <1>
61
+
includedResources: [] <2>
62
+
excludedResources: [] <3>
63
+
storageLocation: <velero-sample-1> <4>
64
+
ttl: 720h0m0s
65
+
labelSelector: <5>
66
+
matchLabels:
67
+
app=<label_1>
68
+
app=<label_2>
69
+
app=<label_3>
70
+
orLabelSelectors: <6>
71
+
- matchLabels:
72
+
app=<label_1>
73
+
app=<label_2>
74
+
app=<label_3>
75
+
----
76
+
<1> Specify an array of namespaces to back up.
77
+
<2> Optional: Specify an array of resources to include in the backup. Resources might be shortcuts (for example, 'po' for 'pods') or fully-qualified. If unspecified, all resources are included.
78
+
<3> Optional: Specify an array of resources to exclude from the backup. Resources might be shortcuts (for example, 'po' for 'pods') or fully-qualified.
79
+
<4> Specify the name of the `backupStorageLocations` CR.
80
+
<5> Map of {key,value} pairs of backup resources that have *all* of the specified labels.
81
+
<6> Map of {key,value} pairs of backup resources that have *one or more* of the specified labels.
82
+
83
+
. Verify that the status of the `Backup` CR is `Completed`:
84
+
+
85
+
[source,terminal]
86
+
----
87
+
$ oc get backup -n openshift-adp <backup> -o jsonpath='{.status.phase}'
0 commit comments