autorestic/docs/markdown/location/hooks.md

21 lines
430 B
Markdown
Raw Normal View History

2020-05-17 12:52:30 +00:00
# Hooks
2021-04-15 22:26:57 +00:00
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`.
2020-05-17 12:52:30 +00:00
```yml | .autorestic.yml
locations:
my-location:
from: /data
to: my-backend
hooks:
before:
- echo "Hello"
- echo "Human"
after:
- echo "kthxbye"
```
> :ToCPrevNext