mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-11-05 05:04:13 +01:00
healthcheck example
This commit is contained in:
parent
3457fc01bf
commit
0f6c34dc6b
@ -9,6 +9,7 @@ This amazing people helped the project!
|
||||
- @david-boles - Docs.
|
||||
- @SebDanielsson - Brew.
|
||||
- @n194 - AUR Package.
|
||||
- @Zottelchen - Healthchecks example.
|
||||
- @jin-park-dev - Typos.
|
||||
- @sumnerboy12 - Typos.
|
||||
- @FuzzyMistborn - Typos.
|
||||
|
@ -14,4 +14,27 @@ This can come in handy if a backup process crashed or if it was accidentally can
|
||||
autorestic exec -b my-backend -- unlock
|
||||
```
|
||||
|
||||
## Use hooks to integrate with [healthchecks](https://healthchecks.io/)
|
||||
|
||||
> Thanks to @Zottelchen for providing it ❤️
|
||||
|
||||
```yaml
|
||||
extras:
|
||||
healthchecks: &healthchecks
|
||||
hooks:
|
||||
before:
|
||||
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Starting backup for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>/start'
|
||||
failure:
|
||||
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup failed for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>/fail'
|
||||
success:
|
||||
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup successful for location: ${AUTORESTIC_LOCATION}" https://<healthchecks-url>/ping/<uid>'
|
||||
|
||||
locations:
|
||||
something:
|
||||
<<: *healthchecks
|
||||
from: /somewhere
|
||||
to:
|
||||
- somewhere-else
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
||||
|
Loading…
Reference in New Issue
Block a user