Skip to content

Commit 3ad779d

Browse files
committed
Modularization work for backing-up title
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
1 parent 90230ce commit 3ad779d

File tree

7 files changed

+79
-61
lines changed

7 files changed

+79
-61
lines changed

backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,4 @@ FSB does not support backing up `hostPath` volumes. For more information, see li
3838

3939
include::snippets/pod-volume-restore-snapshot-read-only.adoc[]
4040

41-
.Prerequisites
42-
43-
* You must install the OpenShift API for Data Protection (OADP) Operator.
44-
* You must not disable the default `nodeAgent` installation by setting `spec.configuration.nodeAgent.enable` to `false` in the `DataProtectionApplication` CR.
45-
* You must select Kopia or Restic as the uploader by setting `spec.configuration.nodeAgent.uploaderType` to `kopia` or `restic` in the `DataProtectionApplication` CR.
46-
* The `DataProtectionApplication` CR must be in a `Ready` state.
47-
48-
.Procedure
49-
50-
* Create the `Backup` CR, as in the following example:
51-
+
52-
[source,yaml]
53-
----
54-
apiVersion: velero.io/v1
55-
kind: Backup
56-
metadata:
57-
name: <backup>
58-
labels:
59-
velero.io/storage-location: default
60-
namespace: openshift-adp
61-
spec:
62-
defaultVolumesToFsBackup: true <1>
63-
...
64-
----
65-
<1> In OADP version 1.2 and later, add the `defaultVolumesToFsBackup: true` setting within the `spec` block. In OADP version 1.1, add `defaultVolumesToRestic: true`.
41+
include::modules/oadp-backingup-using-kopia.adoc[leveloffset=+1]

backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,4 @@ You back up persistent volumes with Container Storage Interface (CSI) snapshots
1010

1111
For more information, 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].
1212

13-
.Prerequisites
14-
15-
* The cloud provider must support CSI snapshots.
16-
* You must enable CSI in the `DataProtectionApplication` CR.
17-
18-
.Procedure
19-
20-
* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
21-
+
22-
.Example configuration file
23-
[source,yaml,subs="attributes+"]
24-
----
25-
apiVersion: snapshot.storage.k8s.io/v1
26-
kind: VolumeSnapshotClass
27-
metadata:
28-
name: <volume_snapshot_class_name>
29-
labels:
30-
velero.io/csi-volumesnapshot-class: "true" <1>
31-
annotations:
32-
snapshot.storage.kubernetes.io/is-default-class: true <2>
33-
driver: <csi_driver>
34-
deletionPolicy: <deletion_policy_type> <3>
35-
----
36-
<1> Must be set to `true`.
37-
<2> If you are restoring this volume in another cluster with the same driver, make sure that you set the `snapshot.storage.kubernetes.io/is-default-class` parameter to `false` instead of setting it to `true`. Otherwise, the restore will partially fail.
38-
<3> OADP supports the `Retain` and `Delete` deletion policy types for CSI and Data Mover backup and restore.
39-
40-
.Next steps
41-
42-
* You can now create a `Backup` CR.
13+
include::modules/oadp-backingup-persistent-volumes.adoc[leveloffset=+1]

backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
include::_attributes/common-attributes.adoc[]
55
:context: backing-up-applications
66

7-
toc::[]
8-
97
When performing a backup, it is possible to specify one or more commands to execute in a container within a pod, based on the pod being backed up.
108

119
The commands can be configured to performed before any custom action processing (_Pre_ hooks), or after all custom actions have been completed and any additional items specified by the custom action have been backed up (_Post_ hooks).

backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
include::_attributes/common-attributes.adoc[]
66
:context: backing-up-applications
77

8-
toc::[]
9-
108
The schedule operation allows you to create a backup of your data at a particular time, specified by a Cron expression.
119

1210
You schedule backups by creating a `Schedule` custom resource (CR) instead of a `Backup` CR.
@@ -78,7 +76,9 @@ Enter the minutes value between quotation marks (`" "`).
7876
<3> Name of the `backupStorageLocations` CR.
7977
<4> Optional: In OADP version 1.2 and later, add the `defaultVolumesToFsBackup: true` key-value pair to your configuration when performing backups of volumes with Restic. In OADP version 1.1, add the `defaultVolumesToRestic: true` key-value pair when you back up volumes with Restic.
8078
81-
. Verify that the status of the `Schedule` CR is `Completed` after the scheduled backup runs:
79+
.Verification
80+
81+
* Verify that the status of the `Schedule` CR is `Completed` after the scheduled backup runs:
8282
+
8383
[source,terminal]
8484
----
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/oadp-backing-up-pvs-csi-doc.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="backingup-persistent-volumes_{context}"]
7+
= Backing up persistent volumes with CSI snapshots
8+
9+
.Prerequisites
10+
11+
* The cloud provider must support CSI snapshots.
12+
* You must enable CSI in the `DataProtectionApplication` CR.
13+
14+
.Procedure
15+
16+
* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
17+
+
18+
.Example configuration file
19+
[source,yaml,subs="attributes+"]
20+
----
21+
apiVersion: snapshot.storage.k8s.io/v1
22+
kind: VolumeSnapshotClass
23+
metadata:
24+
name: <volume_snapshot_class_name>
25+
labels:
26+
velero.io/csi-volumesnapshot-class: "true" <1>
27+
annotations:
28+
snapshot.storage.kubernetes.io/is-default-class: true <2>
29+
driver: <csi_driver>
30+
deletionPolicy: <deletion_policy_type> <3>
31+
----
32+
<1> Must be set to `true`.
33+
<2> If you are restoring this volume in another cluster with the same driver, make sure that you set the `snapshot.storage.kubernetes.io/is-default-class` parameter to `false` instead of setting it to `true`. Otherwise, the restore will partially fail.
34+
<3> OADP supports the `Retain` and `Delete` deletion policy types for CSI and Data Mover backup and restore.
35+
36+
.Next steps
37+
38+
* You can now create a `Backup` CR.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="oadp-backingup-file-system-backup_{context}"]
7+
= Backing up applications with File System Backup
8+
9+
.Prerequisites
10+
11+
* You must install the OpenShift API for Data Protection (OADP) Operator.
12+
* You must not disable the default `nodeAgent` installation by setting `spec.configuration.nodeAgent.enable` to `false` in the `DataProtectionApplication` CR.
13+
* You must select Kopia or Restic as the uploader by setting `spec.configuration.nodeAgent.uploaderType` to `kopia` or `restic` in the `DataProtectionApplication` CR.
14+
* The `DataProtectionApplication` CR must be in a `Ready` state.
15+
16+
.Procedure
17+
18+
* Create the `Backup` CR, as in the following example:
19+
+
20+
[source,yaml]
21+
----
22+
apiVersion: velero.io/v1
23+
kind: Backup
24+
metadata:
25+
name: <backup>
26+
labels:
27+
velero.io/storage-location: default
28+
namespace: openshift-adp
29+
spec:
30+
defaultVolumesToFsBackup: true <1>
31+
...
32+
----
33+
<1> In OADP version 1.2 and later, add the `defaultVolumesToFsBackup: true` setting within the `spec` block. In OADP version 1.1, add `defaultVolumesToRestic: true`.

modules/oadp-creating-backup-cr.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ spec:
7575
<5> Map of {key,value} pairs of backup resources that have *all* of the specified labels.
7676
<6> Map of {key,value} pairs of backup resources that have *one or more* of the specified labels.
7777

78-
. Verify that the status of the `Backup` CR is `Completed`:
78+
.Verification
79+
80+
* Verify that the status of the `Backup` CR is `Completed`:
7981
+
8082
[source,terminal]
8183
----

0 commit comments

Comments
 (0)