mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-11-06 05:34:13 +01:00
21 lines
430 B
Markdown
21 lines
430 B
Markdown
# Hooks
|
|
|
|
If you want to perform some commands before and/or after a backup, you can use hooks.
|
|
|
|
They consist of a list of `before`/`after` commands that will be executed in the same directory as the target `from`.
|
|
|
|
```yml | .autorestic.yml
|
|
locations:
|
|
my-location:
|
|
from: /data
|
|
to: my-backend
|
|
hooks:
|
|
before:
|
|
- echo "Hello"
|
|
- echo "Human"
|
|
after:
|
|
- echo "kthxbye"
|
|
```
|
|
|
|
> :ToCPrevNext
|