diff --git a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc index e0547acbfdc6..951e94fbbb7e 100644 --- a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc +++ b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-applications-restic-doc.adoc @@ -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: - 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] \ No newline at end of file diff --git a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc index 445e0d497aac..512f770a08d1 100644 --- a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc +++ b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc @@ -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: - labels: - velero.io/csi-volumesnapshot-class: "true" <1> - annotations: - snapshot.storage.kubernetes.io/is-default-class: true <2> -driver: -deletionPolicy: <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] diff --git a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc index dd98c51f3bfd..03bdad419a5c 100644 --- a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc +++ b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-creating-backup-hooks-doc.adoc @@ -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). diff --git a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc index 135e8f5f7a3d..cd4ee3572969 100644 --- a/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc +++ b/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-scheduling-backups-doc.adoc @@ -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. @@ -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] ---- diff --git a/modules/oadp-backingup-persistent-volumes.adoc b/modules/oadp-backingup-persistent-volumes.adoc new file mode 100644 index 000000000000..07f61588ca72 --- /dev/null +++ b/modules/oadp-backingup-persistent-volumes.adoc @@ -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: + labels: + velero.io/csi-volumesnapshot-class: "true" <1> + annotations: + snapshot.storage.kubernetes.io/is-default-class: true <2> +driver: +deletionPolicy: <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. \ No newline at end of file diff --git a/modules/oadp-backingup-using-kopia.adoc b/modules/oadp-backingup-using-kopia.adoc new file mode 100644 index 000000000000..03f8116bfe11 --- /dev/null +++ b/modules/oadp-backingup-using-kopia.adoc @@ -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: + 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`. \ No newline at end of file diff --git a/modules/oadp-creating-backup-cr.adoc b/modules/oadp-creating-backup-cr.adoc index b6ad1e6766e7..c8721c24d61d 100644 --- a/modules/oadp-creating-backup-cr.adoc +++ b/modules/oadp-creating-backup-cr.adoc @@ -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] ----