1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic.git synced 2024-12-11 23:41:32 +01:00

Merge pull request #40 from z-bsod/main

README.md: Backup from stdin - clarify `src` variable and add example for a backup job using stdin
This commit is contained in:
L3D 2021-10-26 16:53:25 +02:00 committed by GitHub
commit abe671db58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,7 +121,7 @@ Available variables:
| ------------------ |:-----------------------------:| ------------ |
| `name` | yes | The name of this backup. Used together with pruning and scheduling and needs to be unique. |
| `repo` | yes | The name of the repository to backup to. |
| `src` | yes | The source directory or file |
| `src` | yes (unless `stdin` == `true`) | The source directory or file |
| `stdin` | no | Is this backup created from a [stdin](https://restic.readthedocs.io/en/stable/040_backup.html#reading-data-from-stdin)? |
| `stdin_cmd` | no (yes if `stdin` == `true`) | The command to produce the stdin. |
| `stdin_filename` | no | The filename used in the repository. |
@ -156,6 +156,14 @@ restic_backups:
src: /path/to/data
scheduled: true
schedule_oncalendar: '*-*-* 01:00:00'
database:
name: database
repo: remove
stdin: true
stdin_cmd: pg_dump -Ubackup db_name
stdin_filename: db_name_dump.sql
scheduled: true
schedule_oncalendar: '*-*-* 01:30:00'
```
> You can also specify restic_backups as an array, which is a legacy feature and