mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-08 11:30:40 +00:00
docs
This commit is contained in:
18
docs/markdown/location/hooks.md
Normal file
18
docs/markdown/location/hooks.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
Reference in New Issue
Block a user