Skip to content

Commit 1969c72

Browse files
authored
Merge pull request #64811 from anarnold97/OADP-2130-Rework-Backup-section
OADP-2130: Restructure of Backup, OADP Installation, Features, Plugins, and Configuring Restructure
2 parents 1563b5e + 1156403 commit 1969c72

17 files changed

+823
-113
lines changed

_topic_maps/_topic_map.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,13 +2819,39 @@ Topics:
28192819
File: installing-oadp-ocs
28202820
- Name: Uninstalling OADP
28212821
File: uninstalling-oadp
2822-
- Name: Backing up and restoring
2822+
- Name: OADP backing up
28232823
Dir: backing_up_and_restoring
28242824
Topics:
28252825
- Name: Backing up applications
28262826
File: backing-up-applications
2827+
- Name: Creating a Backup CR
2828+
File: oadp-creating-backup-cr
2829+
- Name: Backing up persistent volumes with CSI snapshots
2830+
File: oadp-backing-up-pvs-csi-doc
2831+
- Name: Backing up applications with Restic
2832+
File: oadp-backing-up-applications-restic-doc
2833+
- Name: Creating backup hooks
2834+
File: oadp-creating-backup-hooks-doc
2835+
- Name: Scheduling backups using Schedule CR
2836+
File: oadp-scheduling-backups-doc
2837+
- Name: Deleting backups
2838+
File: oadp-deleting-backups-doc
2839+
- Name: OADP restoring
2840+
Dir: backing_up_and_restoring
2841+
Topics:
28272842
- Name: Restoring applications
2828-
File: restoring-applications
2843+
File: restoring-applications
2844+
- Name: OADP Data Mover
2845+
Dir: installing
2846+
Topics:
2847+
- Name: Introduction to OADP Data Mover
2848+
File: data-mover-intro
2849+
- Name: Using Data Mover for CSI snapshots
2850+
File: oadp-using-data-mover-for-csi-snapshots-doc
2851+
- Name: Using OADP 1.2 Data Mover with Ceph storage
2852+
File: oadp-12-data-mover-ceph-doc
2853+
- Name: Cleaning up after a backup using OADP 1.1 Data Mover
2854+
File: oadp-cleaning-up-after-data-mover-1-1-backup-doc
28292855
- Name: Troubleshooting
28302856
File: troubleshooting
28312857
- Name: OADP API

backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc

Lines changed: 12 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include::_attributes/attributes-openshift-dedicated.adoc[]
77

88
toc::[]
99

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/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].
1111

1212
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.
1313

@@ -16,124 +16,36 @@ For more information about CSI volume snapshots, see xref:../../../storage/conta
1616
:FeatureName: The `CloudStorage` API for S3 storage
1717
include::snippets/technology-preview.adoc[]
1818

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].
2020
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].
2222
2323
[IMPORTANT]
2424
====
2525
The {oadp-first} does not support backing up volume snapshots that were created by other software.
2626
====
2727

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].
2929

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].
3131

32-
include::modules/oadp-creating-backup-cr.adoc[leveloffset=+1]
33-
include::modules/oadp-backing-up-pvs-csi.adoc[leveloffset=+1]
34-
include::modules/oadp-backing-up-applications-restic.adoc[leveloffset=+1]
32+
// include::modules/oadp-creating-backup-cr.adoc[leveloffset=+1]
33+
// include::modules/oadp-backing-up-pvs-csi.adoc[leveloffset=+1]
34+
// include::modules/oadp-backing-up-applications-restic.adoc[leveloffset=+1]
3535

36-
.Known issues
36+
[id="known-issues-backing-up-applications"]
37+
== Known issues
3738

3839
{ocp} 4.14 enforces a pod security admission (PSA) policy that can hinder the readiness of pods during a Restic restore process. 
3940

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.
4142

4243
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].
4344

44-
include::modules/oadp-using-data-mover-for-csi-snapshots.adoc[leveloffset=+1]
45-
46-
[id="oadp-12-data-mover-ceph"]
47-
== Using OADP 1.2 Data Mover with Ceph storage
48-
49-
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.
56-
====
57-
58-
include::modules/oadp-ceph-prerequisites.adoc[leveloffset=+2]
59-
60-
[id="defining-crs-for-12-data-mover"]
61-
=== 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.
66-
67-
include::modules/oadp-ceph-preparing-cephfs-crs.adoc[leveloffset=+2]
68-
include::modules/oadp-ceph-preparing-cephrbd-crs.adoc[leveloffset=+2]
69-
include::modules/oadp-ceph-preparing-crs-additional.adoc[leveloffset=+2]
70-
71-
[id="oadp-ceph-back-up-restore-cephfs"]
72-
=== 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.
75-
76-
include::snippets/oadp-ceph-cr-prerequisites.adoc[]
77-
78-
:context: !backing-up-applications
79-
80-
:context: cephfs
81-
82-
include::modules/oadp-ceph-cephfs-back-up-dba.adoc[leveloffset=+2]
83-
include::modules/oadp-ceph-cephfs-back-up.adoc[leveloffset=+2]
84-
include::modules/oadp-ceph-cephfs-restore.adoc[leveloffset=+2]
85-
86-
[id="oadp-ceph-split"]
87-
=== 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.
90-
91-
include::snippets/oadp-ceph-cr-prerequisites.adoc[]
92-
93-
:context: !cephfs
94-
95-
:context: split
96-
97-
include::modules/oadp-ceph-split-back-up-dba.adoc[leveloffset=+2]
98-
include::modules/oadp-ceph-cephfs-back-up.adoc[leveloffset=+2]
99-
include::modules/oadp-ceph-cephfs-restore.adoc[leveloffset=+2]
100-
101-
:context: !split
102-
103-
:context: backing-up-applications
104-
105-
[id="oadp-cleaning-up-after-data-mover-1-1-backup"]
106-
== Cleaning up after a backup using OADP 1.1 Data Mover
107-
108-
For OADP 1.1 Data Mover, you must perform a data cleanup after you perform a backup.
109-
110-
The cleanup consists of deleting the following resources:
111-
112-
* Snapshots in a bucket
113-
* Cluster resources
114-
* Volume snapshot backups (VSBs) after a backup procedure that is either run by a schedule or is run repetitively
115-
116-
include::modules/oadp-cleaning-up-after-data-mover-snapshots.adoc[leveloffset=+2]
117-
118-
[id="deleting-cluster-resources"]
119-
=== Deleting cluster resources
120-
121-
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.
122-
123-
include::modules/oadp-deleting-cluster-resources-following-success.adoc[leveloffset=+3]
124-
include::modules/oadp-deleting-cluster-resources-following-failure.adoc[leveloffset=+3]
125-
126-
include::modules/oadp-vsb-cleanup-after-scheduler.adoc[leveloffset=+2]
127-
12845
[role="_additional-resources"]
12946
.Additional resources
13047
* 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]
13148
* xref:../../../operators/user/olm-installing-operators-in-namespace.adoc#olm-installing-operators-in-namespace[Installing Operators in namespaces for non-administrators]
13249

133-
include::modules/oadp-creating-backup-hooks.adoc[leveloffset=+1]
134-
include::modules/oadp-scheduling-backups.adoc[leveloffset=+1]
135-
include::modules/oadp-deleting-backups.adoc[leveloffset=+1]
13650

137-
[role="_additional-resources"]
138-
.Additional resources
139-
* xref:../../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#velero-obtaining-by-downloading_oadp-troubleshooting[Downloading the Velero CLI tool]
51+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
:_content-type: PROCEDURE
3+
[id="oadp-backing-up-applications-restic-doc"]
4+
= Backing up applications with Restic
5+
include::_attributes/common-attributes.adoc[]
6+
:context: backing-up-applications
7+
8+
toc::[]
9+
10+
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.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="oadp-backing-up-pvs-csi-doc"]
7+
= 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:
25+
+
26+
[source,yaml,subs="attributes+"]
27+
----
28+
apiVersion: snapshot.storage.k8s.io/v1
29+
kind: VolumeSnapshotClass
30+
metadata:
31+
name: <volume_snapshot_class_name>
32+
labels:
33+
velero.io/csi-volumesnapshot-class: "true"
34+
driver: <csi_driver>
35+
deletionPolicy: Retain
36+
----
37+
38+
You can now create a `Backup` CR.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="oadp-creating-backup-cr-doc"]
7+
= Creating a Backup CR
8+
include::_attributes/common-attributes.adoc[]
9+
include::_attributes/attributes-openshift-dedicated.adoc[]
10+
:context: backing-up-applications
11+
12+
toc::[]
13+
14+
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}'
88+
----

0 commit comments

Comments
 (0)