mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Document using multiple commands in hooks (#2365)
Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
@@ -75,6 +75,14 @@ velero backup get nginx-hook-test
|
||||
velero backup logs nginx-hook-test | grep hookCommand
|
||||
```
|
||||
|
||||
## Using Multiple Commands
|
||||
|
||||
To use multiple commands, wrap your target command in a shell and separate them with `;`, `&&`, or other shell conditional constructs.
|
||||
|
||||
```shell
|
||||
pre.hook.backup.velero.io/command='["/bin/bash", "-c", "echo hello > hello.txt && echo goodbye > goodbye.txt"]'
|
||||
```
|
||||
|
||||
|
||||
[1]: api-types/backup.md
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/master/examples/nginx-app/with-pv.yaml
|
||||
|
||||
@@ -75,6 +75,14 @@ velero backup get nginx-hook-test
|
||||
velero backup logs nginx-hook-test | grep hookCommand
|
||||
```
|
||||
|
||||
## Using Multiple Commands
|
||||
|
||||
To use multiple commands, wrap your target command in a shell and separate them with `;`, `&&`, or other shell conditional constructs.
|
||||
|
||||
```shell
|
||||
pre.hook.backup.velero.io/command='["/bin/bash", "-c", "echo hello > hello.txt && echo goodbye > goodbye.txt"]'
|
||||
```
|
||||
|
||||
|
||||
[1]: api-types/backup.md
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.3.1/examples/nginx-app/with-pv.yaml
|
||||
|
||||
Reference in New Issue
Block a user