2020-05-17 12:52:30 +00:00
# 🐣 Examples
2021-04-15 22:26:57 +00:00
## List all the snapshots for all the backends
2020-05-17 12:52:30 +00:00
```bash
2021-04-21 07:41:14 +00:00
autorestic exec -av -- snapshots
2020-05-17 12:52:30 +00:00
```
2021-04-15 22:26:57 +00:00
## Unlock a locked repository
2020-05-17 12:52:30 +00:00
2021-05-01 13:18:05 +00:00
This can come in handy if a backup process crashed or if it was accidentally cancelled. Then the repository would still be locked without an actual process using it. Only do this if you know what you are doing and are sure no other process is actually reading/writing to the repository of course.
2020-05-17 12:52:30 +00:00
```bash
2020-11-13 14:48:20 +00:00
autorestic exec -b my-backend -- unlock
2020-05-17 12:52:30 +00:00
```
2022-04-12 21:59:12 +00:00
## Use hooks to integrate with [healthchecks](https://healthchecks.io/)
2022-04-13 06:55:53 +00:00
> Thanks to @olofvndrhr for providing it ❤️
2022-04-12 21:59:12 +00:00
```yaml
extras:
healthchecks: & healthchecks
hooks:
2022-09-14 10:58:18 +00:00
backup:
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 > '
2022-04-12 21:59:12 +00:00
locations:
something:
< < : * healthchecks
from: /somewhere
to:
- somewhere-else
```
2020-05-17 12:52:30 +00:00
> :ToCPrevNext