@@ -19,23 +19,15 @@ Use the `oc exec` command to run a Velero CLI command:
19
19
20
20
[source,terminal,subs="attributes+"]
21
21
----
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>
24
24
----
25
25
26
26
.Example
27
27
[source,terminal,subs="attributes+"]
28
28
----
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
39
31
----
40
32
41
33
[discrete]
@@ -46,7 +38,8 @@ Use the `velero --help` option to list all Velero CLI commands:
46
38
47
39
[source,terminal,subs="attributes+"]
48
40
----
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
50
43
----
51
44
52
45
[discrete]
@@ -57,15 +50,15 @@ Use the `velero describe` command to retrieve a summary of warnings and errors a
57
50
58
51
[source,terminal,subs="attributes+"]
59
52
----
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>
62
55
----
63
56
64
57
.Example
65
58
[source,terminal,subs="attributes+"]
66
59
----
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
69
62
----
70
63
71
64
[discrete]
@@ -76,13 +69,13 @@ Use the `velero logs` command to retrieve the logs of a `Backup` or `Restore` CR
76
69
77
70
[source,terminal,subs="attributes+"]
78
71
----
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>
81
74
----
82
75
83
76
.Example
84
77
[source,terminal,subs="attributes+"]
85
78
----
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
88
81
----
0 commit comments