-
Notifications
You must be signed in to change notification settings - Fork 71
/
full.toml
215 lines (197 loc) · 9.66 KB
/
full.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# Full rustic config file containing all options which are available through the config file.
#
# This file should be placed in the user's local config dir (~/.config/rustic/) or in the global
# config dir (/etc/rustic).
# If you save it under NAME.toml, use "rustic -P NAME" to access this profile.
#
# Note that most options can be overwritten by the corresponding command line option.
# Global options: These options are used for all commands.
[global]
use-profiles = []
log-level = "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
log-file = "/path/to/rustic.log" # Default: not set
no-progress = false
progress-interval = "100ms"
dry-run = false
check-index = false
# Global hooks: The given commands are called for every command
[global.hooks]
run-before = [
# long form giving command and args explicitly and allow to specify failure behavior
{ command = "echo", args = ["before"], on-failure = "warn" }, # allowed values for on-failure: "error" (default), "warn", "ignore"
] # Default: []
run-after = ["echo after"] # Run after if successful, short version, default: []
run-failed = ["echo failed"] # Default: []
run-finally = ["echo finally"] # Always run after, default: []
# Global env variables: These are set by rustic before calling a subcommand, e.g. rclone or commands
# defined in the repository options.
[global.env]
# This is only an example how to set an rclone env variable. Default: No variables are defined.
RCLONE_XXX = "true"
# Repository options: These options define which backend to use and which password to use.
[repository]
repository = "/repo/rustic" # Must be set
repo-hot = "/my/hot/repo" # Default: not set
# one of the three password options must be set
password = "mySecretPassword"
password-file = "/my/password.txt"
password-command = "my_command.sh"
no-cache = false
cache-dir = "/my/rustic/cachedir" # Default: Applications default cache dir, e.g. ~/.cache/rustic
# use either warm-up (warm-up by file access) or warm-up-command to specify warming up
warm-up = false
warm-up-command = "warmup.sh %id" # Default: not set
warm-up-wait = "10min" # Default: not set
# Additional repository options - depending on backend. These can be only set in the config file or using env variables.
# For env variables use upper snake case and prefix with "RUSTIC_REPO_OPT_", e.g. `use-passwort = "true"` becomes
# `RUSTIC_REPO_OPT_USE_PASSWORT=true`
[repository.options]
post-create-command = "par2create -qq -n1 -r5 %file" # Only local backend; Default: not set
post-delete-command = "sh -c \"rm -f %file*.par2\"" # Only local backend; Default: not set
retry = "default" # Only rest/rclone/all opendal backends; Allowed values: "false"/"off", "default" or number of retries
timeout = "10min" # Only rest/rclone backend
rclone-command = "rclone serve restic --addr localhost:0" # Only rclone; Default: not set
use-password = "true" # Only rclone
rest-url = "http://localhost:8000" # Only rclone; Default: determine REST URL from rclone output
connections = "20" # Only opendal backends; Default: Not set
throttle = "10kB,10MB" # limit and burst per second; only opendal backends; Default: Not set
# Note that opendal backends use several service-dependent options which may be specified here, see
# https://opendal.apache.org/docs/rust/opendal/services/index.html
# Additional repository options for the hot part - depending on backend. These can be only set in the config file or
# using env variables.
# For env variables use upper snake case and prefix with "RUSTIC_REPO_OPTHOT_"
[repository.options-hot]
# see [repository.options]
# Additional repository options for the cold part - depending on backend. These can be only set in the config file or
# using env variables.
# For env variables use upper snake case and prefix with "RUSTIC_REPO_OPTCOLD_"
[repository.options-cold]
# see [repository.options]
# Repository hooks: The given commands are called for commands accessing the repository.
[repository.hooks]
run-before = ["echo before"] # Default: []
run-after = ["echo after"] # Run after if successful, default: []
run-failed = ["echo failed"] # Default: []
run-finally = ["echo finally"] # Always run after, default: []
# Snapshot-filter options: These options apply to all commands that use snapshot filters
[snapshot-filter]
filter-hosts = ["host1", "host2"] # Default: []
filter-labels = ["label1", "label2"] # Default: []
filter-tags = ["tag1,tag2", "tag3"] # Default: []
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
filter-paths = ["path1", "path2,path3"] # Default: []
filter-paths-exact = ["path1", "path2,path3"] # Default: []
filter-after = "2024-01-01" # Default: not set
filter-before = "2024-02-05 12:15" # Default: not set
filter-size = "200MiB" # Default: not set
filter-size-added = "1 MB..10MB" # Default: not set
filter-fn = '|sn| {sn.host == "host1" || sn.description.contains("test")}' # Default: no filter function
# Backup options: These options are used for all sources when calling the backup command.
# They can be overwritten by source-specific options (see below) or command line options.
[backup]
label = "label" # Default: not set
tags = ["tag1", "tag2"]
description = "my description" # Default: not set
description-from = "/path/to/description.txt" # Default: not set
delete-never = false
delete-after = "5d" # Default: not set
host = "manually_set_host" # Default: host name
group-by = "host,label,paths" # Can be any combination of host,label,paths,tags
parent = "123abc" # Default: not set
force = false
ignore-ctime = false
ignore-inode = false
stdin-filename = "stdin" # Only for stdin source
as-path = "/my/path" # Default: not set; Note: This only works if source contains of a single path.
with-atime = false
ignore-devid = false
globs = []
iglobs = []
glob-files = []
iglob-files = []
git-ignore = false
no-require-git = false
exclude-if-present = [".nobackup", "CACHEDIR.TAG"] # Default: not set
custom-ignorefiles = [".rusticignore", ".backupignore"] # Default: not set
one-file-system = false
exclude-larger-than = "100MB" # Default: not set
json = false
init = false
no-scan = false
quiet = false
skip-identical-parent = false
# Backup hooks: The given commands are called for the `backup` command
[backup.hooks]
run-before = ["echo before"] # Default: []
run-after = ["echo after"] # Run after if successful, default: []
run-failed = ["echo failed"] # Default: []
run-finally = ["echo finally"] # Always run after, default: []
# Backup options for specific sources - all above options are also available here and replace them for the given source
[[backup.snapshots]]
sources = ["/path/to/source1"]
label = "label" # Default: not set
# .. and so on. see [backup]
# Source-specific hooks: The given commands when backing up the defined source
[backup.snapshots.hooks]
run-before = ["echo before"] # Default: []
run-after = ["echo after"] # Run after if successful, default: []
run-failed = ["echo failed"] # Default: []
run-finally = ["echo finally"] # Always run after, default: []
[[backup.snapshots]]
sources = [
"/path/to/source2",
"/second/path",
] # multiple local paths are given as array
# ...
# forget options
[forget]
prune = false
group-by = "host,label,paths" # Can be any combination of host,label,paths,tags
# The following filter options can be also defined here and then overwrite the options for the forget command
filter-hosts = ["host1", "host2"] # Default: []
filter-labels = ["label1", "label2"] # Default: []
filter-tags = ["tag1,tag2", "tag3"] # Default: []
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
filter-paths = ["path1", "path2,path3"] # Default: []
filter-paths-exact = ["path1", "path2,path3"] # Default: []
filter-after = "2024-01-01" # Default: not set
filter-before = "2024-02-05 12:15" # Default: not set
filter-size = "200MiB" # Default: not set
filter-size-added = "1 MB..10MB" # Default: not set
filter-fn = '|sn| {sn.host == "host1" || sn.description.contains("test")}' # Default: no filter function
# The retention options follow. All of these are not set by default.
keep-tags = ["tag1", "tag2,tag3"] # Default: not set
keep-ids = [
"123abc",
"11122233",
] # Keep all snapshots whose ID starts with any of these strings, default: not set
keep-last = 0
keep-daily = 3
keep-weekly = 0
keep-monthly = 0
keep-quarter-yearly = 0
keep-half-yearly = 0
keep-yearly = 10
keep-within = "0s"
keep-within-daily = "0 seconds"
keep-within-weekly = "2 months"
keep-within-monthly = "1 year"
keep-within-quarter-yearly = "0 year"
keep-within-half-yearly = "1 year"
keep-within-yearly = "10 years"
[copy]
targets = ["profile1", "profile2"] # Default: []
[webdav]
address = "localhost:8000"
path-template = "[{hostname}]/[{label}]/{time}" # The path template to use for snapshots. {id}, {id_long}, {time}, {username}, {hostname}, {label}, {tags}, {backup_start}, {backup_end} are replaced. [default: "[{hostname}]/[{label}]/{time}"]. Only relevant if no snapshot-path is given.
time-template = "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
symlinks = false
file-access = "read" # Default: "forbidden" for hot/cold repos, else "read"
snapshot-path = "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using path-template
[mount]
path-template = "[{hostname}]/[{label}]/{time}" # The path template to use for snapshots. {id}, {id_long}, {time}, {username}, {hostname}, {label}, {tags}, {backup_start}, {backup_end} are replaced. [default: "[{hostname}]/[{label}]/{time}"]. Only relevant if no snapshot-path is given.
time-template = "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
no-allow-other = true
file-access = "read" # Default: "forbidden" for hot/cold repos, else "read"
mountpoint = "~/mnt"
snapshot-path = "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using path-template