Skip to content

Commit dff7c1f

Browse files
authored
Merge pull request #49967 from mburke5678/OADP_714_Incorrect_information_around_includedResources_field
OADP_714_Incorrect_information_around_includedResources_field
2 parents 1e5a0ef + c725f5a commit dff7c1f

File tree

4 files changed

+47
-42
lines changed

4 files changed

+47
-42
lines changed

modules/oadp-creating-backup-cr.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ You back up Kubernetes images, internal images, and persistent volumes (PVs) by
2222
2323
.Procedure
2424

25-
. Retrieve the `backupStorageLocations` CRs:
25+
. Retrieve the `backupStorageLocations` CRs by entering the following command:
26+
2627
+
2728
[source,terminal]
2829
----
@@ -52,7 +53,9 @@ spec:
5253
hooks: {}
5354
includedNamespaces:
5455
- <namespace> <1>
55-
storageLocation: <velero_sample_1> <2>
56+
includedResources: [] <2>
57+
excludedResources: [] <3>
58+
storageLocation: <velero-sample-1> <4>
5659
ttl: 720h0m0s
5760
labelSelector: <3>
5861
- matchLabels:
@@ -70,9 +73,9 @@ spec:
7073
app=<label_3>
7174
----
7275
<1> Specify an array of namespaces to back up.
73-
<2> Specify the name of the `backupStorageLocations` CR.
74-
<3> Optional. You can configure the backup to include only the resources with all the labels that you specify in this field. Note that the `labelSelector` and `orlabelSelectors` fields are mutually exclusive. You can use only one of them.
75-
<4> Optional. You can configure the backup to include the resources with any of the labels that you specify in this field. Note that the `orlabelSelectors` and `labelSelector` fields are mutually exclusive. You can use only one of them.
76+
<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.
77+
<3> Optional: Specify an array of resources to exclude from the backup. Resources might be shortcuts (for example, 'po' for 'pods') or fully-qualified.
78+
<4> Specify the name of the `backupStorageLocations` CR.
7679

7780
. Verify that the status of the `Backup` CR is `Completed`:
7881
+

modules/oadp-creating-backup-hooks.adoc

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,34 @@ spec:
2727
- name: <hook_name>
2828
includedNamespaces:
2929
- <namespace> <1>
30-
excludedNamespaces:
30+
excludedNamespaces: <2>
3131
- <namespace>
32-
includedResources:
33-
- pods <2>
34-
excludedResources: []
35-
labelSelector: <3>
32+
includedResources: []
33+
- pods <3>
34+
excludedResources: [] <4>
35+
labelSelector: <5>
3636
matchLabels:
3737
app: velero
3838
component: server
39-
pre: <4>
39+
pre: <6>
4040
- exec:
41-
container: <container> <5>
41+
container: <container> <7>
4242
command:
43-
- /bin/uname <6>
43+
- /bin/uname <8>
4444
- -a
45-
onError: Fail <7>
46-
timeout: 30s <8>
47-
post: <9>
45+
onError: Fail <9>
46+
timeout: 30s <10>
47+
post: <11>
4848
...
4949
----
50-
<1> Array of namespaces to which the hook applies. If this value is not specified, the hook applies to all namespaces.
51-
<2> Currently, pods are the only supported resource.
52-
<3> Optional: This hook only applies to objects matching the label selector.
53-
<4> Array of hooks to run before the backup.
54-
<5> Optional: If the container is not specified, the command runs in the first container in the pod.
55-
<6> Array of commands that the hook runs.
56-
<7> Allowed values for error handling are `Fail` and `Continue`. The default is `Fail`.
57-
<8> Optional: How long to wait for the commands to run. The default is `30s`.
58-
<9> This block defines an array of hooks to run after the backup, with the same parameters as the pre-backup hooks.
50+
<1> Optional: You can specify namespaces to which the hook applies. If this value is not specified, the hook applies to all namespaces.
51+
<2> Optional: You can specify namespaces to which the hook does not apply.
52+
<3> Currently, pods are the only supported resource that hooks can apply to.
53+
<4> Optional: You can specify resources to which the hook does not apply.
54+
<5> Optional: This hook only applies to objects matching the label. If this value is not specified, the hook applies to all namespaces.
55+
<6> Array of hooks to run before the backup.
56+
<7> Optional: If the container is not specified, the command runs in the first container in the pod.
57+
<8> This is the entrypoint for the init container being added.
58+
<9> Allowed values for error handling are `Fail` and `Continue`. The default is `Fail`.
59+
<10> Optional: How long to wait for the commands to run. The default is `30s`.
60+
<11> This block defines an array of hooks to run after the backup, with the same parameters as the pre-backup hooks.

modules/oadp-creating-restore-cr.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ metadata:
2828
namespace: openshift-adp
2929
spec:
3030
backupName: <backup> <1>
31-
existingResourcePolicy: <policy> <2>
31+
includedResources: [] <2>
3232
excludedResources:
3333
- nodes
3434
- events
@@ -39,18 +39,16 @@ spec:
3939
restorePVs: true
4040
----
4141
<1> Name of the `Backup` CR.
42-
<2> Optional. This field accepts two values:
43-
* `none`: The restore process does not affect existing resources.
44-
* `update`: The restore process replaces existing resources with their backup versions.
42+
<2> Optional. Specify an array of resources to include in the restore process. Resources might be shortcuts (for example, 'po' for 'pods') or fully-qualified. If unspecified, all resources are included.
4543

46-
. Verify that the status of the `Restore` CR is `Completed`:
44+
. Verify that the status of the `Restore` CR is `Completed` by entering the following command:
4745
+
4846
[source,terminal]
4947
----
5048
$ oc get restore -n openshift-adp <restore> -o jsonpath='{.status.phase}'
5149
----
5250

53-
. Verify that the backup resources have been restored:
51+
. Verify that the backup resources have been restored by entering the following command:
5452
+
5553
[source,terminal]
5654
----

modules/oadp-creating-restore-hooks.adoc

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,25 @@ spec:
5353
command:
5454
- /bin/ash
5555
- -c
56+
timeout: <4>
5657
- exec:
57-
container: <container> <4>
58+
container: <container> <5>
5859
command:
59-
- /bin/bash <5>
60+
- /bin/bash <6>
6061
- -c
6162
- "psql < /backup/backup.sql"
62-
waitTimeout: 5m <6>
63-
execTimeout: 1m <7>
64-
onError: Continue <8>
63+
waitTimeout: 5m <7>
64+
execTimeout: 1m <8>
65+
onError: Continue <9>
6566
----
6667
<1> Optional: Array of namespaces to which the hook applies. If this value is not specified, the hook applies to all namespaces.
67-
<2> Currently, pods are the only supported resource.
68+
<2> Currently, pods are the only supported resource that hooks can apply to.
6869
<3> Optional: This hook only applies to objects matching the label selector.
69-
<4> Optional: If the container is not specified, the command runs in the first container in the pod.
70-
<5> Array of commands that the hook runs.
71-
<6> Optional: If the `waitTimeout` is not specified, the restore waits indefinitely. You can specify how long to wait for a container to start and for preceding hooks in the container to complete. The wait timeout starts when the container is restored and might require time for the container to pull the image and mount the volumes.
72-
<7> Optional: How long to wait for the commands to run. The default is `30s`.
73-
<8> Allowed values for error handling are `Fail` and `Continue`:
70+
<4> Optional: Timeout specifies the maximum amount of time Velero waits for `initContainers` to complete.
71+
<5> Optional: If the container is not specified, the command runs in the first container in the pod.
72+
<6> This is the entrypoint for the init container being added.
73+
<7> Optional: How long to wait for a container to become ready. This should be long enough for the container to start and for any preceding hooks in the same container to complete. If not set, the restore process waits indefinitely.
74+
<8> Optional: How long to wait for the commands to run. The default is `30s`.
75+
<9> Allowed values for error handling are `Fail` and `Continue`:
7476
** `Continue`: Only command failures are logged.
7577
** `Fail`: No more restore hooks run in any container in any pod. The status of the `Restore` CR will be `PartiallyFailed`.

0 commit comments

Comments
 (0)