blob: 9219d37cb54f890c73f59a98142053470c9546a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
---
argument_specs:
main:
options:
backup_name:
type: "str"
description: "Unique name for this backup job — used for systemd unit and script names"
default: "backup"
backup_paths:
type: "list"
elements: "str"
description: "List of paths to back up"
required: true
backup_systemd_schedule:
type: "str"
description: "systemd OnCalendar schedule (e.g. daily, weekly, *-*-* 02:00) — used on systemd hosts"
default: "daily"
backup_cron_schedule:
type: "str"
description: "cron schedule (e.g. 0 0 * * *) — used on OpenRC hosts"
default: "0 0 * * *"
backup_retention_daily:
type: "int"
description: "Number of daily snapshots to keep"
default: 7
backup_retention_weekly:
type: "int"
description: "Number of weekly snapshots to keep"
default: 4
backup_retention_monthly:
type: "int"
description: "Number of monthly snapshots to keep"
default: 6
backup_repo:
type: "str"
description: "Restic repository URL (e.g. s3:http://machine.local:3900/backups)"
required: true
backup_access_key_id:
type: "str"
description: "S3 access key ID"
required: true
backup_secret_access_key:
type: "str"
description: "S3 secret access key"
required: true
backup_password:
type: "str"
description: "Restic repository encryption password"
required: true
backup_user:
type: "str"
description: "System user to run the backup as"
default: "backup"
backup_group:
type: "str"
description: "System group for the backup user"
default: "backup"
backup_restore_id:
type: "str"
description: >-
Snapshot ID to restore, or "latest". Only used with --tags restore.
To list available snapshot IDs, run on the target host: source
/etc/credstore/{{ backup_name }}-backup.env, export
RESTIC_REPOSITORY="$BACKUP_REPO" RESTIC_PASSWORD="$BACKUP_PASSWORD"
AWS_ACCESS_KEY_ID="$BACKUP_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY="$BACKUP_SECRET_ACCESS_KEY", then run
restic snapshots
default: "latest"
restore_target:
type: "str"
description: "Directory to restore snapshot contents into. Only used with --tags restore"
required: false
|