Document using multiple commands in hooks (#2365)

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2020-03-30 11:15:27 -04:00
committed by GitHub
parent 0fdb79aa2d
commit a8852c34e6
2 changed files with 16 additions and 0 deletions

View File

@@ -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

View File

@@ -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