Skip to content

Commit

Permalink
Modify hook docs for clarity on displaying hook execution results (#7679
Browse files Browse the repository at this point in the history
)

Signed-off-by: allenxu404 <qix2@vmware.com>
  • Loading branch information
allenxu404 authored Apr 17, 2024
1 parent bc29471 commit 498a239
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/7679-allenxu404
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Modify hook docs for clarity on displaying hook execution results
16 changes: 16 additions & 0 deletions site/content/docs/main/backup-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ pre:

Note that the container must support the shell command you use.

## Backup Hook Execution Results
### Viewing Results

Velero records the execution results of hooks, allowing users to obtain this information by running the following command:

```bash
$ velero backup describe <backup name>
```

The displayed results include the number of hooks that were attempted to be executed and the number of hooks that failed execution. Any detailed failure reasons will be present in `Errors` section if applicable.

```bash
HooksAttempted: 1
HooksFailed: 0
```


[1]: api-types/backup.md
[2]: https://github.com/vmware-tanzu/velero/blob/main/examples/nginx-app/with-pv.yaml
17 changes: 17 additions & 0 deletions site/content/docs/main/restore-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,21 @@ postHooks:

Note that the container must support the shell command you use.

## Restore Hook Execution Results
### Viewing Results

Velero records the execution results of hooks, allowing users to obtain this information by running the following command:

```bash
$ velero restore describe <restore name>
```

The displayed results include the number of hooks that were attempted to be executed and the number of hooks that failed execution. Any detailed failure reasons will be present in `Errors` section if applicable.

```bash
HooksAttempted: 1
HooksFailed: 0
```


[1]: api-types/restore.md

0 comments on commit 498a239

Please sign in to comment.