Skip to content

Commit ad6e6f5

Browse files
committed
feat: Add documentation for minutely timeline
1 parent 8b9bd0f commit ad6e6f5

File tree

2 files changed

+63
-57
lines changed

2 files changed

+63
-57
lines changed

config/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,15 @@ hooks when backing up the defined sources into a snapshot.
245245
| -------------------------- | ----------------------------------------------------------------------- | ------------------ | ---------------------- | ---------------------------- |
246246
| group-by | Group snapshots by given criteria before applying keep policies. | "host,label,paths" | | --group-by |
247247
| keep-last | Number of most recent snapshots to keep. | Not set | 15 | --keep-last, -l |
248+
| keep-minutely, -M | Number of minutely snapshots to keep. | Not set | | --keep-minutely |
248249
| keep-hourly, -H | Number of hourly snapshots to keep. | Not set | | --keep-hourly |
249250
| keep-daily, -d | Number of daily snapshots to keep. | Not set | 8 | --keep-daily |
250251
| keep-weekly, -w | Number of weekly snapshots to keep. | Not set | | --keep-weekly |
251252
| keep-monthly, -m | Number of monthly snapshots to keep. | Not set | | --keep-monthly |
252253
| keep-quarter-yearly | Number of quarter-yearly snapshots to keep. | Not set | | --keep-quarter-yearly |
253254
| keep-half-yearly | Number of half-yearly snapshots to keep. | Not set | | --keep-half-yearly |
254255
| keep-yearly, -y | Number of yearly snapshots to keep. | Not set | | --keep-yearly |
256+
| keep-within-minutely | The time duration within which minutely snapshots will be kept. | Not set | "2 hours" | --keep-within-minutely |
255257
| keep-within-hourly | The time duration within which hourly snapshots will be kept. | Not set | "1 day" | --keep-within-hourly |
256258
| keep-within-daily | The time duration within which daily snapshots will be kept. | Not set | "7 days" | --keep-within-daily |
257259
| keep-within-weekly | The time duration within which weekly snapshots will be kept. | Not set | | --keep-within-weekly |

config/full.toml

+61-57
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Global options: These options are used for all commands.
1010
[global]
1111
use-profiles = []
12-
log-level = "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
12+
log-level = "info" # any of "off", "error", "warn", "info", "debug", "trace"; default: "info"
1313
log-file = "/path/to/rustic.log" # Default: not set
1414
no-progress = false
1515
progress-interval = "100ms"
@@ -20,7 +20,9 @@ check-index = false
2020
[global.hooks]
2121
run-before = [
2222
# long form giving command and args explicitly and allow to specify failure behavior
23-
{ command = "echo", args = ["before"], on-failure = "warn" }, # allowed values for on-failure: "error" (default), "warn", "ignore"
23+
{ command = "echo", args = [
24+
"before",
25+
], on-failure = "warn" }, # allowed values for on-failure: "error" (default), "warn", "ignore"
2426
] # Default: []
2527
run-after = ["echo after"] # Run after if successful, short version, default: []
2628
run-failed = ["echo failed"] # Default: []
@@ -35,31 +37,31 @@ RCLONE_XXX = "true"
3537
# Repository options: These options define which backend to use and which password to use.
3638
[repository]
3739
repository = "/repo/rustic" # Must be set
38-
repo-hot = "/my/hot/repo" # Default: not set
40+
repo-hot = "/my/hot/repo" # Default: not set
3941
# one of the three password options must be set
4042
password = "mySecretPassword"
4143
password-file = "/my/password.txt"
4244
password-command = "my_command.sh"
4345
no-cache = false
44-
cache-dir = "/my/rustic/cachedir" # Default: Applications default cache dir, e.g. ~/.cache/rustic
46+
cache-dir = "/my/rustic/cachedir" # Default: Applications default cache dir, e.g. ~/.cache/rustic
4547
# use either warm-up (warm-up by file access) or warm-up-command to specify warming up
4648
warm-up = false
4749
warm-up-command = "warmup.sh %id" # Default: not set
48-
warm-up-wait = "10min" # Default: not set
50+
warm-up-wait = "10min" # Default: not set
4951

5052
# Additional repository options - depending on backend. These can be only set in the config file or using env variables.
5153
# For env variables use upper snake case and prefix with "RUSTIC_REPO_OPT_", e.g. `use-passwort = "true"` becomes
5254
# `RUSTIC_REPO_OPT_USE_PASSWORT=true`
5355
[repository.options]
54-
post-create-command = "par2create -qq -n1 -r5 %file" # Only local backend; Default: not set
55-
post-delete-command = "sh -c \"rm -f %file*.par2\"" # Only local backend; Default: not set
56-
retry = "default" # Only rest/rclone/all opendal backends; Allowed values: "false"/"off", "default" or number of retries
57-
timeout = "10min" # Only rest/rclone backend
56+
post-create-command = "par2create -qq -n1 -r5 %file" # Only local backend; Default: not set
57+
post-delete-command = "sh -c \"rm -f %file*.par2\"" # Only local backend; Default: not set
58+
retry = "default" # Only rest/rclone/all opendal backends; Allowed values: "false"/"off", "default" or number of retries
59+
timeout = "10min" # Only rest/rclone backend
5860
rclone-command = "rclone serve restic --addr localhost:0" # Only rclone; Default: not set
59-
use-password = "true" # Only rclone
60-
rest-url = "http://localhost:8000" # Only rclone; Default: determine REST URL from rclone output
61-
connections = "20" # Only opendal backends; Default: Not set
62-
throttle = "10kB,10MB" # limit and burst per second; only opendal backends; Default: Not set
61+
use-password = "true" # Only rclone
62+
rest-url = "http://localhost:8000" # Only rclone; Default: determine REST URL from rclone output
63+
connections = "20" # Only opendal backends; Default: Not set
64+
throttle = "10kB,10MB" # limit and burst per second; only opendal backends; Default: Not set
6365
# Note that opendal backends use several service-dependent options which may be specified here, see
6466
# https://opendal.apache.org/docs/rust/opendal/services/index.html
6567

@@ -77,42 +79,42 @@ throttle = "10kB,10MB" # limit and burst per second; only opendal backends; Defa
7779

7880
# Repository hooks: The given commands are called for commands accessing the repository.
7981
[repository.hooks]
80-
run-before = ["echo before"] # Default: []
81-
run-after = ["echo after"] # Run after if successful, default: []
82-
run-failed = ["echo failed"] # Default: []
82+
run-before = ["echo before"] # Default: []
83+
run-after = ["echo after"] # Run after if successful, default: []
84+
run-failed = ["echo failed"] # Default: []
8385
run-finally = ["echo finally"] # Always run after, default: []
8486

8587
# Snapshot-filter options: These options apply to all commands that use snapshot filters
8688
[snapshot-filter]
87-
filter-hosts = ["host1", "host2"] # Default: []
88-
filter-labels = ["label1", "label2"] # Default: []
89-
filter-tags = ["tag1,tag2", "tag3"] # Default: []
90-
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
91-
filter-paths = ["path1", "path2,path3"] # Default: []
92-
filter-paths-exact = ["path1", "path2,path3"] # Default: []
93-
filter-after = "2024-01-01" # Default: not set
94-
filter-before = "2024-02-05 12:15" # Default: not set
95-
filter-size = "200MiB" # Default: not set
96-
filter-size-added = "1 MB..10MB" # Default: not set
89+
filter-hosts = ["host1", "host2"] # Default: []
90+
filter-labels = ["label1", "label2"] # Default: []
91+
filter-tags = ["tag1,tag2", "tag3"] # Default: []
92+
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
93+
filter-paths = ["path1", "path2,path3"] # Default: []
94+
filter-paths-exact = ["path1", "path2,path3"] # Default: []
95+
filter-after = "2024-01-01" # Default: not set
96+
filter-before = "2024-02-05 12:15" # Default: not set
97+
filter-size = "200MiB" # Default: not set
98+
filter-size-added = "1 MB..10MB" # Default: not set
9799
filter-fn = '|sn| {sn.host == "host1" || sn.description.contains("test")}' # Default: no filter function
98100

99101
# Backup options: These options are used for all sources when calling the backup command.
100102
# They can be overwritten by source-specific options (see below) or command line options.
101103
[backup]
102-
label = "label" # Default: not set
104+
label = "label" # Default: not set
103105
tags = ["tag1", "tag2"]
104-
description = "my description" # Default: not set
105-
description-from = "/path/to/description.txt" # Default: not set
106+
description = "my description" # Default: not set
107+
description-from = "/path/to/description.txt" # Default: not set
106108
delete-never = false
107-
delete-after = "5d" # Default: not set
108-
host = "manually_set_host" # Default: host name
109-
group-by = "host,label,paths" # Can be any combination of host,label,paths,tags
110-
parent = "123abc" # Default: not set
109+
delete-after = "5d" # Default: not set
110+
host = "manually_set_host" # Default: host name
111+
group-by = "host,label,paths" # Can be any combination of host,label,paths,tags
112+
parent = "123abc" # Default: not set
111113
force = false
112114
ignore-ctime = false
113115
ignore-inode = false
114-
stdin-filename = "stdin" # Only for stdin source
115-
as-path = "/my/path" # Default: not set; Note: This only works if source contains of a single path.
116+
stdin-filename = "stdin" # Only for stdin source
117+
as-path = "/my/path" # Default: not set; Note: This only works if source contains of a single path.
116118
with-atime = false
117119
ignore-devid = false
118120
globs = []
@@ -121,10 +123,10 @@ glob-files = []
121123
iglob-files = []
122124
git-ignore = false
123125
no-require-git = false
124-
exclude-if-present = [".nobackup", "CACHEDIR.TAG"] # Default: not set
126+
exclude-if-present = [".nobackup", "CACHEDIR.TAG"] # Default: not set
125127
custom-ignorefiles = [".rusticignore", ".backupignore"] # Default: not set
126128
one-file-system = false
127-
exclude-larger-than = "100MB" # Default: not set
129+
exclude-larger-than = "100MB" # Default: not set
128130
json = false
129131
init = false
130132
no-scan = false
@@ -133,22 +135,22 @@ skip-identical-parent = false
133135

134136
# Backup hooks: The given commands are called for the `backup` command
135137
[backup.hooks]
136-
run-before = ["echo before"] # Default: []
137-
run-after = ["echo after"] # Run after if successful, default: []
138-
run-failed = ["echo failed"] # Default: []
138+
run-before = ["echo before"] # Default: []
139+
run-after = ["echo after"] # Run after if successful, default: []
140+
run-failed = ["echo failed"] # Default: []
139141
run-finally = ["echo finally"] # Always run after, default: []
140142

141143
# Backup options for specific sources - all above options are also available here and replace them for the given source
142144
[[backup.snapshots]]
143145
sources = ["/path/to/source1"]
144-
label = "label" # Default: not set
146+
label = "label" # Default: not set
145147
# .. and so on. see [backup]
146148

147149
# Source-specific hooks: The given commands when backing up the defined source
148150
[backup.snapshots.hooks]
149-
run-before = ["echo before"] # Default: []
150-
run-after = ["echo after"] # Run after if successful, default: []
151-
run-failed = ["echo failed"] # Default: []
151+
run-before = ["echo before"] # Default: []
152+
run-after = ["echo after"] # Run after if successful, default: []
153+
run-failed = ["echo failed"] # Default: []
152154
run-finally = ["echo finally"] # Always run after, default: []
153155

154156
[[backup.snapshots]]
@@ -163,16 +165,16 @@ sources = [
163165
prune = false
164166
group-by = "host,label,paths" # Can be any combination of host,label,paths,tags
165167
# The following filter options can be also defined here and then overwrite the options for the forget command
166-
filter-hosts = ["host1", "host2"] # Default: []
167-
filter-labels = ["label1", "label2"] # Default: []
168-
filter-tags = ["tag1,tag2", "tag3"] # Default: []
169-
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
170-
filter-paths = ["path1", "path2,path3"] # Default: []
171-
filter-paths-exact = ["path1", "path2,path3"] # Default: []
172-
filter-after = "2024-01-01" # Default: not set
173-
filter-before = "2024-02-05 12:15" # Default: not set
174-
filter-size = "200MiB" # Default: not set
175-
filter-size-added = "1 MB..10MB" # Default: not set
168+
filter-hosts = ["host1", "host2"] # Default: []
169+
filter-labels = ["label1", "label2"] # Default: []
170+
filter-tags = ["tag1,tag2", "tag3"] # Default: []
171+
filter-tags-exact = ["tag1,tag2", "tag2"] # Default: []
172+
filter-paths = ["path1", "path2,path3"] # Default: []
173+
filter-paths-exact = ["path1", "path2,path3"] # Default: []
174+
filter-after = "2024-01-01" # Default: not set
175+
filter-before = "2024-02-05 12:15" # Default: not set
176+
filter-size = "200MiB" # Default: not set
177+
filter-size-added = "1 MB..10MB" # Default: not set
176178
filter-fn = '|sn| {sn.host == "host1" || sn.description.contains("test")}' # Default: no filter function
177179
# The retention options follow. All of these are not set by default.
178180
keep-tags = ["tag1", "tag2,tag3"] # Default: not set
@@ -181,13 +183,15 @@ keep-ids = [
181183
"11122233",
182184
] # Keep all snapshots whose ID starts with any of these strings, default: not set
183185
keep-last = 0
186+
keep-minutely = 10
184187
keep-daily = 3
185188
keep-weekly = 0
186189
keep-monthly = 0
187190
keep-quarter-yearly = 0
188191
keep-half-yearly = 0
189192
keep-yearly = 10
190193
keep-within = "0s"
194+
keep-within-minutely = "2 hours"
191195
keep-within-daily = "0 seconds"
192196
keep-within-weekly = "2 months"
193197
keep-within-monthly = "1 year"
@@ -201,10 +205,10 @@ targets = ["profile1", "profile2"] # Default: []
201205
[webdav]
202206
address = "localhost:8000"
203207
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.
204-
time-template = "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
208+
time-template = "%Y-%m-%d_%H-%M-%S" # only relevant if no snapshot-path is given
205209
symlinks = false
206-
file-access = "read" # Default: "forbidden" for hot/cold repos, else "read"
207-
snapshot-path = "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using path-template
210+
file-access = "read" # Default: "forbidden" for hot/cold repos, else "read"
211+
snapshot-path = "latest:/dir" # Default: not set - if not set, generate a virtual tree with all snapshots using path-template
208212

209213
[mount]
210214
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.

0 commit comments

Comments
 (0)