Skip to content

Commit d844248

Browse files
authored
Merge pull request #46487 from sbeskin-redhat/OADP_512_Remove_grep_from_oc_exec_velero_examples
OADP-512 Remove grep from `oc exec .. velero` examples
2 parents 13c8811 + e945e3c commit d844248

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

modules/migration-debugging-velero-resources.adoc

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,15 @@ Use the `oc exec` command to run a Velero CLI command:
1919

2020
[source,terminal,subs="attributes+"]
2121
----
22-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
23-
-- ./velero <backup_restore_cr> <command> <cr_name>
22+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
23+
<backup_restore_cr> <command> <cr_name>
2424
----
2525

2626
.Example
2727
[source,terminal,subs="attributes+"]
2828
----
29-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
30-
-- ./velero backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql
31-
----
32-
33-
You can specify `velero-<pod> -n {namespace}` in place of `$(oc get pods -n {namespace} -o name | grep velero)`.
34-
35-
.Example
36-
[source,terminal,subs="attributes+"]
37-
----
38-
$ oc exec velero-<pod> -n {namespace} -- ./velero backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql
29+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
30+
backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql
3931
----
4032

4133
[discrete]
@@ -46,7 +38,8 @@ Use the `velero --help` option to list all Velero CLI commands:
4638

4739
[source,terminal,subs="attributes+"]
4840
----
49-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) -- ./velero --help
41+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
42+
--help
5043
----
5144

5245
[discrete]
@@ -57,15 +50,15 @@ Use the `velero describe` command to retrieve a summary of warnings and errors a
5750

5851
[source,terminal,subs="attributes+"]
5952
----
60-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
61-
-- ./velero <backup_restore_cr> describe <cr_name>
53+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
54+
<backup_restore_cr> describe <cr_name>
6255
----
6356

6457
.Example
6558
[source,terminal,subs="attributes+"]
6659
----
67-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
68-
-- ./velero backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql
60+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
61+
backup describe 0e44ae00-5dc3-11eb-9ca8-df7e5254778b-2d8ql
6962
----
7063

7164
[discrete]
@@ -76,13 +69,13 @@ Use the `velero logs` command to retrieve the logs of a `Backup` or `Restore` CR
7669

7770
[source,terminal,subs="attributes+"]
7871
----
79-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
80-
-- ./velero <backup_restore_cr> logs <cr_name>
72+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
73+
<backup_restore_cr> logs <cr_name>
8174
----
8275

8376
.Example
8477
[source,terminal,subs="attributes+"]
8578
----
86-
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
87-
-- ./velero restore logs ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf
79+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
80+
restore logs ccc7c2d0-6017-11eb-afab-85d0007f5a19-x4lbf
8881
----

modules/migration-partial-failure-velero.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ status:
4747
+
4848
[source,yaml]
4949
----
50-
$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore describe <restore>
50+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
51+
restore describe <restore>
5152
----
5253
+
5354
.Example output
@@ -67,7 +68,8 @@ Errors:
6768
+
6869
[source,yaml]
6970
----
70-
$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -n openshift-migration -- ./velero restore logs <restore>
71+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
72+
restore logs <restore>
7173
----
7274
+
7375
.Example output

modules/oadp-backup-restore-cr-issues.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ If a backup is interrupted, it cannot be resumed.
3737
+
3838
[source,terminal]
3939
----
40-
$ oc exec $(oc get pods -n openshift-adp -o name | grep velero) \
41-
-- ./velero backup describe <backup>
40+
$ oc -n {namespace} exec deployment/velero -c velero -- ./velero \
41+
backup describe <backup>
4242
----
4343

4444
. Delete the `Backup` CR:

0 commit comments

Comments
 (0)