-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathexample.toml
50 lines (40 loc) · 1.25 KB
/
example.toml
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
name = "postgresql backup" # optional. if not set, the filename will be used without the extension
repositories = [
"/tmp/restic-repo1",
"s3:s3.amazonaws.com/bucket_name"
]
[execution]
parallel = true
retry_count = 10
retry_backoff = "1:00 exponential" # 00:00 = min:sec; 00:00:00 = hour:min:sec
# strategies:
# - static (same duration every try)
# - linear (duration * retry number)
# - exponential
[environment]
RESTIC_PASSWORD = "CHANGEME"
# or RESTIC_PASSWORD_FILE
# https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables
[backup]
sources = [
"/var/lib/postgresql",
"/etc/postgresql",
"/tmp/pgdump.sql"
]
exclude_patterns = ['pg_stats_tmp/']
# exclude_files = []
# exclude_if_present = []
pre_hooks = ["systemctl stop postgresql"]
post_hooks = ["systemctl start postgresql"]
[prune]
keep-last = 3
keep-hourly = 5
keep-weekly = 10
keep-monthly = 30
group-by = "host,paths"
# https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy
[check]
checks = ["check-unused", "read-data"]
[metrics.prometheus]
path = "/var/lib/node_exporter/textfile_collector/runrestic.prom"
# password_replacement = "XXX" # use this if you need to redact passwords from repos in the log file #39