|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// backup_and_restore/application_backup_and_restore/oadp-self-service/oadp-self-service-namespace-admin-use-cases.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="oadp-self-service-deleting-nab_{context}"] |
| 7 | += Deleting a NonAdminBackup CR |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +As a namespace admin user, you can delete a `NonAdminBackup` (NAB) custom resource (CR). |
| 11 | + |
| 12 | +.Prerequisites |
| 13 | + |
| 14 | +* You are logged in to the cluster as a namespace admin user. |
| 15 | +* The cluster administrator has installed the {oadp-short} Operator. |
| 16 | +* The cluster administrator has configured the `DataProtectionApplication` (DPA) CR to enable {oadp-short} Self-Service. |
| 17 | +* The cluster administrator has created a namespace for you and has authorized you to operate from that namespace. |
| 18 | +* You have created a NAB CR in your authorized namespace. |
| 19 | +
|
| 20 | +
|
| 21 | +.Procedure |
| 22 | + |
| 23 | +. Edit the `NonAdminBackup` CR YAML manifest file by running the following command: |
| 24 | ++ |
| 25 | +[source,terminal] |
| 26 | +---- |
| 27 | +$ oc edit <nab_cr> -n <authorized_namespace> |
| 28 | +---- |
| 29 | ++ |
| 30 | +where: |
| 31 | + |
| 32 | +`<nab_cr>`:: Specifies the name of the NAB CR to be deleted. |
| 33 | +`<authorized_namespace>`:: Specifies the name of your authorized namespace. |
| 34 | + |
| 35 | +. Update the NAB CR YAML manifest file and add the `deleteBackup` flag as shown in the following example: |
| 36 | ++ |
| 37 | +[source,yaml] |
| 38 | +---- |
| 39 | +apiVersion: oadp.openshift.io/v1alpha1 |
| 40 | +kind: NonAdminBackup |
| 41 | +metadata: |
| 42 | + name: <nab_cr> |
| 43 | +spec: |
| 44 | + backupSpec: |
| 45 | + includedNamespaces: |
| 46 | + - <authorized_namespace> |
| 47 | + deleteBackup: true |
| 48 | +---- |
| 49 | ++ |
| 50 | +where: |
| 51 | + |
| 52 | +`<nab_cr>`:: Specify the name of the NAB CR to be deleted. |
| 53 | +`<authorized_namespace>`:: Specify the name of your authorized namespace. |
| 54 | +`deleteBackup: true`:: Add the `deleteBackup` flag and set it to `true`. |
| 55 | + |
| 56 | +.Verification |
| 57 | + |
| 58 | +* Verify that the NAB CR is deleted by running the following command: |
| 59 | ++ |
| 60 | +[source,terminal] |
| 61 | +---- |
| 62 | +$ oc get nab <nab_cr> |
| 63 | +---- |
| 64 | ++ |
| 65 | +`<nab_cr>` is the name of the NAB CR you deleted. |
| 66 | ++ |
| 67 | +You should see an output as shown in the following example: |
| 68 | ++ |
| 69 | +[source,terminal] |
| 70 | +---- |
| 71 | +Error from server (NotFound): nonadminbackups.oadp.openshift.io "test-nab" not found |
| 72 | +---- |
0 commit comments