You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autorestic/docs/md/locations/hooks.md

19 lines
472 B

# Hooks
Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.
```yml | .autorestic.yml
locations:
my-location:
from: /data
to: my-backend
hooks:
before:
- echo "Hello"
- echo "Human"
after:
- echo "kthxbye"
```
> :ToCPrevNext