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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# 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.
[]
= []
= false
= false
= "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
= "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
= "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
= "warn" # any of "off", "error", "warn", "info", "debug", "trace"; default: "warn"
= "/path/to/rustic.log" # Default: not set
= false
= "100ms"
= "host,label,paths"
= false
= false
= "http://push-gateway/"
= "user"
= "secret"
# Sending metrics directly to the Prometheus in this example
# See https://prometheus.io/docs/guides/opentelemetry/
= "http://prometheus/api/v1/otlp/v1/metrics"
# Global hooks: The given commands are called for every command
[]
= [
# long form giving command and args explicitly and allow to specify failure behavior
{ = "echo", = ["before"], = "warn" }, # allowed values for on-failure: "error" (default), "warn", "ignore"
] # Default: []
= ["echo after"] # Run after if successful, short version, default: []
= ["echo failed"] # Default: []
= ["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.
[]
# This is only an example how to set an rclone env variable. Default: No variables are defined.
= "true"
[]
= "xxx"
# Repository options: These options define which backend to use and which password to use.
[]
= "/repo/rustic" # Must be set
= "/my/hot/repo" # Default: not set
= false
= "/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
= false
= "warmup.sh %id" # Default: not set
= "10min" # Default: not set
= "warmup_wait.sh" # Default: not set
= 1
# one of the following credential options should be set; if not you will be always asked for a password
= '{"mac":{"k":"TEQN3py56U36eH4hTTgaUA==","r":"+/Cc+P7jN42a7bZVZYyAcw=="},"encrypt":"LKyGDH7dfX24a9u+3q8DgvuFVDfI3fNrzeo6l4r8u64="}'
= "/my/key.txt"
= "my_key_command.sh"
= "mySecretPassword"
= "/my/password.txt"
= "my_command.sh"
# 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`
[]
= "par2create -qq -n1 -r5 %file" # Only local backend; Default: not set
= "sh -c \"rm -f %file*.par2\"" # Only local backend; Default: not set
= "default" # Only rest/rclone/all opendal backends; Allowed values: "false"/"off", "default" or number of retries
= "10min" # Only rest/rclone backend
= "rclone serve restic --addr localhost:0" # Only rclone; Default: not set
= "true" # Only rclone
= "http://localhost:8000" # Only rclone; Default: determine REST URL from rclone output
= "20" # Only opendal backends; Default: Not set
= "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_"
[]
# 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_"
[]
# see [repository.options]
# Repository hooks: The given commands are called for commands accessing the repository.
[]
= ["echo before"] # Default: []
= ["echo after"] # Run after if successful, default: []
= ["echo failed"] # Default: []
= ["echo finally"] # Always run after, default: []
# Snapshot-filter options: These options apply to all commands that use snapshot filters
[]
= ["host1", "host2"] # Default: []
= ["label1", "label2"] # Default: []
= ["tag1,tag2", "tag3"] # Default: []
= ["tag1,tag2", "tag2"] # Default: []
= ["path1", "path2,path3"] # Default: []
= ["path1", "path2,path3"] # Default: []
= "2024-01-01" # Default: not set
= "2024-02-05 12:15" # Default: not set
= "200MiB" # Default: not set
= "1 MB..10MB" # Default: not set
= '.description | contains ("test")' # Default: no jq filter function
= "5" # Default: not set
# 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.
[]
= "label" # Default: not set
= ["tag1", "tag2"]
= "my description" # Default: not set
= "/path/to/description.txt" # Default: not set
= false
= "5d" # Default: not set
= "manually_set_host" # Default: host name
= "host,label,paths" # Can be any combination of host,label,paths,tags
= ["123abc"] # Default: not set
= false
= false
= false
= "echo test" # Default: empty
= "stdin" # Only for stdin source
= "/my/path" # Default: not set; Note: This only works if source contains of a single path.
= "mtime" # Allowed: "yes", "no", "mtime"
= "yes" # Allowed: "yes", "no", "mtime"
= "hardlink" # Allowed: "yes", "no", "hardlink"
= "yes" # Allowed: "yes", "no"
= "special" # Allowed: "special", "file"
= []
= []
= []
= []
= false
= false
= [".nobackup", "CACHEDIR.TAG"] # Default: not set
= [
"com.apple.metadata:com_apple_backup_excludeItem",
] # Default: not set
= [".rusticignore", ".backupignore"] # Default: not set
= false
= "100MB" # Default: not set
= false
= false
= false
= false
= "my-backup-jobs" # Only used if global prometheus or opentelemetry option is set; default: not set
# Backup hooks: The given commands are called for the `backup` command
[]
= ["echo before"] # Default: []
= ["echo after"] # Run after if successful, default: []
= ["echo failed"] # Default: []
= ["echo finally"] # Always run after, default: []
[]
= "xxx"
# Backup options for specific sources - all above options are also available here and replace them for the given source
[[]]
= ["/path/to/source1"]
= "label" # Default: not set
# .. and so on. see [backup]
# Source-specific hooks: The given commands when backing up the defined source
[]
= ["echo before"] # Default: []
= ["echo after"] # Run after if successful, default: []
= ["echo failed"] # Default: []
= ["echo finally"] # Always run after, default: []
[]
= "xxx"
[[]]
= [
"/path/to/source2",
"/second/path",
] # multiple local paths are given as array
# ...
# forget options
[]
= false
= "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
= ["host1", "host2"] # Default: []
= ["label1", "label2"] # Default: []
= ["tag1,tag2", "tag3"] # Default: []
= ["tag1,tag2", "tag2"] # Default: []
= ["path1", "path2,path3"] # Default: []
= ["path1", "path2,path3"] # Default: []
= "2024-01-01" # Default: not set
= "2024-02-05 12:15" # Default: not set
= "200MiB" # Default: not set
= "1 MB..10MB" # Default: not set
= '.description | contains ("test")' # Default: no jq filter function
= "5" # Default: not set
# The retention options follow. All of these are not set by default.
= ["tag1", "tag2,tag3"] # Default: not set
= [
"123abc",
"11122233",
] # Keep all snapshots whose ID starts with any of these strings, default: not set
= 0
= 10
= 5
= 3
= 0
= 0
= 0
= 0
= 10
= "0s"
= "2 hours"
= "3 days"
= "0 seconds"
= "2 months"
= "1 year"
= "0 year"
= "1 year"
= "10 years"
= false
[]
= ["profile1", "profile2"] # Default: []
[]
= "localhost:8000"
= "[{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.
= "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
= false
= "read" # Default: "forbidden" for hot/cold repos, else "read"
= "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using 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.
= "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
= true # don't allow other users to access the mount point
= "read" # Default: "forbidden" for hot/cold repos, else "read"
= "~/mnt"
= "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using path-template
= [
"kernel_cache", # Default: ["kernel_cache]
]