Commit Graph

9514 Commits

Author SHA1 Message Date
Michael Eischer 4a63f7fd13 Merge pull request #5701 from jylenhof/master 2026-05-10 21:31:15 +02:00
Michael Eischer 5608e86cdb Merge pull request #5699 from MichaelEischer/dump-with-relative-paths 2026-05-10 17:54:08 +02:00
Michael Eischer ed418d8d60 document that switching between relative and absolute paths prevents change detection 2026-05-10 17:40:55 +02:00
Michael Eischer 93357440da doc: describe effects of relative paths on snapshot structure 2026-05-10 17:34:42 +02:00
Michael Eischer 5b7df8135e Merge pull request #5713 from MichaelEischer/index-optimization 2026-05-10 01:09:06 +02:00
Michael Eischer adce279d04 add changelog 2026-05-10 00:38:01 +02:00
Michael Eischer 5c935e71fa index: also preallocate hashed array tree 2026-05-10 00:35:17 +02:00
Michael Eischer 934c615e51 index: support index preallocation 2026-05-10 00:35:17 +02:00
Michael Eischer ba638b6602 indexmap: use bloom filter to drastically speed up check for unknown blobs
Only in use on 64-bit systems. Use the upper 28bits of the id of an
index entry as bloom filter. This allows skipping the index entry
traversal most of the time if an id is not stored in the hashmap.

The bloom filter embedded in the index entry id is check each time
before following a reference to an index entry. This further reduces
the risk of false positives. The bloom filter itself is basically for
free on modern CPUs.

The main performance cost of checking for unknown blobs in the index are
the essentially random RAM accesses for the initial bucket lookup as
well as following the next pointer in the index entries. With the bloom
filter most of the time only the initial bucket lookup is necessary.

This speeds up checking for unknown blobs by a factor 5 (!), while
having no effect on the lookup of known blobs:

$ benchstat no-bloom with-bloom
name                old time/op  new time/op  delta
IndexHasUnknown-16  49.0ms ± 2%   9.9ms ± 7%  -79.70%  (p=0.000 n=10+10)
IndexHasKnown-16    48.0ms ± 3%  47.9ms ± 3%     ~     (p=0.968 n=10+9)

This bloom filter parameters m=28 k=1 were derived empirically, while
also leaving sufficient room for very large repositories. Before this
commit, the final merge index step took roughly 1 second per million
index entries. With the chosen bloom filter parameters, it would
currently take 19 hours to just merge such an index. It is safe to
assume that such large repositories don't exist.

Comparison with other parameter sets:

$ m=28 k=1 versus m=32 k=1
name                old time/op  new time/op  delta
IndexHasUnknown-16  49.0ms ± 2%   9.7ms ±16%  -80.17%  (p=0.000 n=10+10)
IndexHasKnown-16    48.0ms ± 3%  48.4ms ± 3%     ~     (p=0.436 n=10+10)

$ m=28 k=1 versus m=24 k=1
name                old time/op  new time/op  delta
IndexHasUnknown-16  49.0ms ± 2%  10.8ms ±13%  -77.90%  (p=0.000 n=10+10)
IndexHasKnown-16    48.0ms ± 3%  47.9ms ± 3%     ~     (p=0.684 n=10+10)

$ m=28 k=1 versus m=28 k=2
name                old time/op  new time/op  delta
IndexHasUnknown-16  49.0ms ± 2%  24.9ms ± 5%  -49.27%  (p=0.000 n=10+10)
IndexHasKnown-16    48.0ms ± 3%  48.0ms ± 4%     ~     (p=1.000 n=10+10)

`k=2` outright wrecks the performance. This is most likely the case as
it performs worse on longer index entry chains, which also happen to be
the expensive ones to process.

`m=32` yields diminishing returns, while getting within an order of
magnitude of the largest known restic repositories.

Design alternatives:

In principle it would be possible to add a single large bloom filter
instead of embedding them in the index entry ids. However, this bloom
filter would necessarily incur additional random memory accesses and
thus slow things down overall.
2026-05-10 00:35:17 +02:00
Michael Eischer 320f709fbc index: modernize masterindex tests
`b.Loop()` drastically shortens benchmark execution times for tests with
an expensive initialization phase as it only has to happen once now.
2026-05-10 00:35:17 +02:00
Michael Eischer e33ed5d0c1 index: make tests more representative 2026-05-10 00:35:17 +02:00
Michael Eischer 39084a912e Merge pull request #5700 from MichaelEischer/err-invalid-env 2026-05-10 00:18:40 +02:00
jylenhof 24c3b73f7c doc(installation): add mise alternative installation method
Signed-off-by: jylenhof <jygithub@lenhof.eu.org>
2026-05-08 12:20:18 +02:00
Michael Eischer f5ab39b33d mount: avoid duplicate index loading (#5720) 2026-05-07 22:59:55 +02:00
Michael Eischer ca555897f2 Add incremental index loading changelog 2026-05-07 22:52:23 +02:00
Michael Eischer 4c0dc9e202 index: support incremental index loading
Do not require a full index reload if only a few additional index files
have been added. This can drastically speed up loading the index in the
mount command.
2026-05-07 22:52:03 +02:00
Michael Eischer b24d210b45 mount: load mount root before reporting readiness 2026-05-07 22:42:03 +02:00
dependabot[bot] 3dcd60d979 build(deps): bump docker/metadata-action from 5 to 6 (#21764)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:31:56 +02:00
dependabot[bot] fbf6fad74f build(deps): bump github.com/klauspost/compress from 1.18.3 to 1.18.4 (#5733)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:31:34 +02:00
dependabot[bot] 302e713c5d build(deps): bump github.com/elithrar/simple-scrypt from 1.4.0 to 1.4.1 (#5736)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:29:50 +02:00
dependabot[bot] 2ef86a8410 build(deps): bump docker/setup-buildx-action from 3 to 4 (#21763)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:16:29 +02:00
dependabot[bot] 760610a29a build(deps): bump docker/build-push-action from 6 to 7 (#21765)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:16:22 +02:00
dependabot[bot] 48d7f232c2 build(deps): bump docker/setup-qemu-action from 3 to 4 (#21766)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:15:32 +02:00
dependabot[bot] 25e72d3259 build(deps): bump docker/login-action from 3.7.0 to 4.0.0 (#21768)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 22:15:23 +02:00
Rohan Santhosh Kumar 90ce78dbaa docs: fix Nix installation typo (#21772)
Co-authored-by: Codex <codex@openai.com>
2026-05-07 22:13:20 +02:00
rawtaz 1807d269cd Merge pull request #21769 from Rohan5commit/fix-participating-doc-typo-20260401
Fix a typo in the contributing docs
2026-04-01 12:19:59 +02:00
Codex b1e9811ffc Fix a typo in the contributing docs 2026-04-01 10:32:50 +08:00
Winfried Plappert 54347eb6fa Enhancement: restic find - more integration tests (#5672) 2026-02-26 21:52:26 +01:00
Michael Eischer 271d622823 Merge pull request #5725 from AdrianMastronardi/fix/4258-document-backup-progress-bar 2026-02-26 21:29:29 +01:00
Michael Eischer 541eb5cfd8 clarify changelog expectations (#5721) 2026-02-25 20:36:07 +00:00
Winfried Plappert f9b63050eb Bugfix: `restic find --pack <tree-pack>` did not produce output for tree packs (#5664) 2026-02-25 21:24:31 +01:00
rawtaz 49c988be07 Merge pull request #5724 from AdrianMastronardi/fix/5218-dead-link-installation-docs
docs: remove outdated CentOS 6/7 installation instructions
2026-02-24 12:08:32 +01:00
Adrian Mastronardi 9b1d45935a docs: remove version-specific references from RHEL/CentOS instructions 2026-02-24 01:02:42 +01:00
Adrian Mastronardi 102ea6da2b docs: document backup progress bar fields (#4258) 2026-02-24 00:06:38 +01:00
Adrian Mastronardi 4e71921a17 docs: remove outdated CentOS 6/7 installation instructions (#5218) 2026-02-23 23:15:49 +01:00
Winfried Plappert c5e09ae9b1 docs: expand restic find - documentation (#5675) 2026-02-19 18:07:05 +00:00
Winfried Plappert 1f329cd933 docs: expand documentation about testing (#5346) 2026-02-19 18:26:15 +01:00
Johannes Truschnigg a8f0ad5cc4 mount: check for more requisite mountpoint conditions (#5718)
* mount: check for more requisite mountpoint conditions

In order to be able to mount a repository over a mountpoint target
directory via FUSE, that target directory needs to be both writeable and
executable for the UID performing the mount.

Without this patch, `restic mount` only checks for the target pathname's
existence, which can lead to a lot of data transfer and/or computation
for large repos to be performed before eventually croaking with a fatal
"fusermount: failed to chdir to mountpoint: Permission denied" (or
similar) error.

FUSE does allow for mounting over a target path that refers to a regular
(writeable) file, but the result is not accessible via chdir(), so we
prevent that as well, and accept only directory inodes as the intended
target mountpoint path.

* Don't use snake_case identifiers

* Add changelog entry

* tweak changelog summary

---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-02-19 17:11:49 +00:00
Michael Eischer 4c56384481 docs: describe assigning ambient capabilities using systemd (#5698)
---

Co-authored-by: udf2457 <udf2457@users.noreply.github.com>
2026-02-18 22:33:21 +01:00
Winfried Plappert 8b567a9270 Bugfix restic find: missing check for mtime --oldest/--newest (#5310) 2026-02-18 21:14:35 +00:00
Michael Eischer 27c560b371 Merge pull request #5650 from fabien-joubert/docs-warning-capabilities
docs: add warning for capability-based non-root backups
2026-02-18 21:44:04 +01:00
Andreas Scherbaum 66d915ef79 Add space in error message (#5704) 2026-02-18 20:27:02 +00:00
Michael Eischer 7077500a3b Have backup -vv mention compressed size of added files (#5669)
ui: mention compressed size of added files in `backup -vv`

This is already shown for modified files, but the added files message
wasn't updated when compression was implemented in restic.

Co-authored-by: Ilya Grigoriev <ilyagr@users.noreply.github.com>
2026-02-18 21:24:29 +01:00
Michael Eischer 6566f786e9 stats: also print snapshot size statistics in debug mode (#5712) 2026-02-18 21:21:40 +01:00
Michael Eischer d1937a530b clarify pack ID in decryption error (#5710)
pack ID is included in full. In addition, the error message now says
that it is a pack file.
2026-02-18 20:43:10 +01:00
Michael Eischer 5be6d9c73f fail of RESTIC_READ_CONCURRENCY or RESTIC_COMPRESSION are invalid 2026-02-01 15:57:07 +01:00
gunar 7101f11133 Fail fast for invalid RESTIC_PACK_SIZE env values (#5592)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-02-01 15:45:31 +01:00
Michael Eischer 8bff5cead0 Merge pull request #5696 from restic/dependabot/go_modules/github.com/minio/minio-go/v7-7.0.98 2026-02-01 12:29:55 +01:00
Michael Eischer 5e43a44b15 Merge pull request #5680 from castilma/unlock-doc 2026-02-01 12:13:52 +01:00
Michael Eischer 67c13c643d Merge pull request #5691 from MichaelEischer/fix-rewriter-error 2026-02-01 12:09:52 +01:00