Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,4 @@ FSB does not support backing up `hostPath` volumes. For more information, see li

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

.Prerequisites

* You must install the OpenShift API for Data Protection (OADP) Operator.
* You must not disable the default `nodeAgent` installation by setting `spec.configuration.nodeAgent.enable` to `false` in the `DataProtectionApplication` CR.
* You must select Kopia or Restic as the uploader by setting `spec.configuration.nodeAgent.uploaderType` to `kopia` or `restic` in the `DataProtectionApplication` CR.
* The `DataProtectionApplication` CR must be in a `Ready` state.

.Procedure

* Create the `Backup` CR, as in the following example:
+
[source,yaml]
----
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 the `spec` block. In OADP version 1.1, add `defaultVolumesToRestic: true`.
include::modules/oadp-backingup-using-kopia.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,4 @@ You back up persistent volumes with Container Storage Interface (CSI) snapshots

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

.Prerequisites

* The cloud provider must support CSI snapshots.
* You must enable CSI in the `DataProtectionApplication` CR.

.Procedure

* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
+
.Example configuration file
[source,yaml,subs="attributes+"]
----
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: <volume_snapshot_class_name>
labels:
velero.io/csi-volumesnapshot-class: "true" <1>
annotations:
snapshot.storage.kubernetes.io/is-default-class: true <2>
driver: <csi_driver>
deletionPolicy: <deletion_policy_type> <3>
----
<1> Must be set to `true`.
<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.
<3> OADP supports the `Retain` and `Delete` deletion policy types for CSI and Data Mover backup and restore.

.Next steps

* You can now create a `Backup` CR.
include::modules/oadp-backingup-persistent-volumes.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
include::_attributes/common-attributes.adoc[]
:context: backing-up-applications

toc::[]

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.

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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
include::_attributes/common-attributes.adoc[]
:context: backing-up-applications

toc::[]

The schedule operation allows you to create a backup of your data at a particular time, specified by a Cron expression.

You schedule backups by creating a `Schedule` custom resource (CR) instead of a `Backup` CR.
Expand Down Expand Up @@ -78,7 +76,9 @@ Enter the minutes value between quotation marks (`" "`).
<3> Name of the `backupStorageLocations` CR.
<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.

. Verify that the status of the `Schedule` CR is `Completed` after the scheduled backup runs:
.Verification

* Verify that the status of the `Schedule` CR is `Completed` after the scheduled backup runs:
+
[source,terminal]
----
Expand Down
38 changes: 38 additions & 0 deletions modules/oadp-backingup-persistent-volumes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc

:_mod-docs-content-type: PROCEDURE
[id="backingup-persistent-volumes_{context}"]
= Backing up persistent volumes with CSI snapshots

.Prerequisites

* The cloud provider must support CSI snapshots.
* You must enable CSI in the `DataProtectionApplication` CR.

.Procedure

* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
+
.Example configuration file
[source,yaml,subs="attributes+"]
----
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: <volume_snapshot_class_name>
labels:
velero.io/csi-volumesnapshot-class: "true" <1>
annotations:
snapshot.storage.kubernetes.io/is-default-class: true <2>
driver: <csi_driver>
deletionPolicy: <deletion_policy_type> <3>
----
<1> Must be set to `true`.
<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.
<3> OADP supports the `Retain` and `Delete` deletion policy types for CSI and Data Mover backup and restore.

.Next steps

* You can now create a `Backup` CR.
33 changes: 33 additions & 0 deletions modules/oadp-backingup-using-kopia.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc

:_mod-docs-content-type: PROCEDURE
[id="oadp-backingup-file-system-backup_{context}"]
= Backing up applications with File System Backup

.Prerequisites

* You must install the OpenShift API for Data Protection (OADP) Operator.
* You must not disable the default `nodeAgent` installation by setting `spec.configuration.nodeAgent.enable` to `false` in the `DataProtectionApplication` CR.
* You must select Kopia or Restic as the uploader by setting `spec.configuration.nodeAgent.uploaderType` to `kopia` or `restic` in the `DataProtectionApplication` CR.
* The `DataProtectionApplication` CR must be in a `Ready` state.

.Procedure

* Create the `Backup` CR, as in the following example:
+
[source,yaml]
----
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 the `spec` block. In OADP version 1.1, add `defaultVolumesToRestic: true`.
4 changes: 3 additions & 1 deletion modules/oadp-creating-backup-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ spec:
<5> Map of {key,value} pairs of backup resources that have *all* of the specified labels.
<6> Map of {key,value} pairs of backup resources that have *one or more* of the specified labels.

. Verify that the status of the `Backup` CR is `Completed`:
.Verification

* Verify that the status of the `Backup` CR is `Completed`:
+
[source,terminal]
----
Expand Down