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.
39 lines
1.3 KiB
39 lines
1.3 KiB
5 years ago
|
# 🐣 Examples
|
||
|
|
||
4 years ago
|
## List all the snapshots for all the backends
|
||
5 years ago
|
|
||
|
```bash
|
||
4 years ago
|
autorestic exec -av -- snapshots
|
||
5 years ago
|
```
|
||
|
|
||
4 years ago
|
## Unlock a locked repository
|
||
5 years ago
|
|
||
4 years ago
|
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.
|
||
5 years ago
|
|
||
|
```bash
|
||
4 years ago
|
autorestic exec -b my-backend -- unlock
|
||
5 years ago
|
```
|
||
|
|
||
3 years ago
|
## Use hooks to integrate with [healthchecks](https://healthchecks.io/)
|
||
|
|
||
3 years ago
|
> Thanks to @olofvndrhr for providing it ❤️
|
||
3 years ago
|
|
||
|
```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
|
||
|
```
|