Commit Graph
9949 Commits
Author SHA1 Message Date
Rob MartinandMichael Eischer 2c9b353cbf repository: do not delete config on atomic backends during upgrade rollback (#22136)
In UpgradeRepo, if upgradeRepository fails, the error handler attempts
contingency rollback by re-uploading the original config file.

However, the contingency path unconditionally executed repo.be.Remove(ctx, h)
before calling repo.be.Save. On backends supporting atomic replacement (such
as local filesystems), a failed upgrade (e.g. out-of-disk-space or permissions
error while writing the temporary file) leaves the original, valid version 1
configuration file completely intact on disk.

Unconditionally removing the config file during rollback actively deletes
the working configuration. If the subsequent Save call also fails, the
repository is left permanently corrupted without a config file.

Condition the pre-removal on !repo.be.Properties().HasAtomicReplace, matching
the forward upgrade path in upgradeRepository. Add a unit test asserting that
aborted upgrades on atomic backends preserve the intact original configuration.

---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-11-15 18:57:01 +00:00
ump45nose c904b78998 prune: list all size suffixes accepted by --repack-smaller-than (#22137) 2026-11-15 19:55:41 +01:00
Dean Chen 4dfa381b9f restorer: don't delete files when a directory tree can't be loaded (#22189)
When loading or iterating a directory tree failed, traverseTreeInner
returned a nil file list together with the error. If the error handler
ignored the error, the caller still called leaveDir with that nil list,
and restore --delete removed every existing entry of the directory in
the target, even though the expected content was simply unknown.

Force disable deletion in that case, the same way it is already done
for invalid node names.

Signed-off-by: Dean Chen <862469039@qq.com>
2026-11-15 19:50:17 +01:00
Younes Beriane c4f9e50609 restorer: rewrite partially matching hard-linked files in full (#22086) 2026-11-15 18:40:11 +00:00
Michael Eischer 516c8d32e0 Merge pull request #22117 from Grivn/fix/legacy-null-tree
data: read empty trees from older repaired snapshots
2026-11-15 19:27:39 +01:00
Michael Eischer 6619ac9620 prune: drop test already covered by unit test 2026-11-15 19:14:35 +01:00
Michael Eischer 354f6aeed6 Untangle and clarify the contributing guide (#22169)
* Small typos and clarification in contributing guide

* cross-link contributing guide and issue/pr template

* drop GOPATH mention

* don't include merge commits in PRs

* make high review delays explicit

* explicitly ask for link to current PR in changelog template

* clarify docs changes

* use bug template as authoritative place'

* consolidate development information in 090_participating

Also move issue / PR creation relevant information into contributing.md.

* clarify meaning of assigning to a pull request

* link to minimum go version

* minor typos

* golanci-lint is always applied in full

* add micro summary

* more typo fixes

* always run golangci-lint

* Simplify issue/pr template

* Fix IRC webchat link

* Move security policy to SECURITY.md

* address review comments
2026-11-15 17:40:08 +01:00
Michael Eischer c734245fd3 repair snapshots: fix missing error message on unreadable snapshot (#22166) 2026-11-06 21:42:11 +01:00
Michael Eischer 0a2b084306 CI: disable swift tests (#22167) 2026-11-06 21:41:45 +01:00
omrzk c2c046c7b1 docs: keep S3 credentials out of Docker arguments (#22118) 2026-11-05 21:18:24 +00:00
ump45nose 0039a14381 global: mention the cache dir and user agent environment defaults (#22135) 2026-11-05 21:12:18 +00:00
John Maguire 7f6d8acb85 backend/b2: Support Multi-Bucket Application Keys (#22104) 2026-11-05 20:52:49 +00:00
Michael Eischer 068a324dcd Merge pull request #22124 from pujitha24/auto/issue-22120
prune: report failure to list pack files as a fatal error
2026-11-05 21:24:23 +01:00
Michael Eischer f515b862de prune: simplify test setup 2026-11-05 21:15:09 +01:00
Winfried Plappert 4619a31716 rewrite - more error exit tests (#22142) 2026-11-05 21:08:01 +01:00
Wei-Lun Li 9a0b9e0eb5 data: return an error for too large numbers in ParseDuration (#22163) 2026-11-05 19:36:49 +00:00
alexcastgonz b5d0152014 doc: list RESTIC_HTTP_USER_AGENT in the environment variables (#22123) 2026-11-05 19:26:31 +00:00
subomiandMichael Eischer 83a2726a30 s3: add option to disable AWS dual-stack endpoints (#22060)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-11-05 19:07:43 +00:00
dependabot[bot] b5463d900d build(deps): bump github.com/klauspost/compress from 1.20.0 to 1.20.3 (#22159)
Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 20:06:09 +01:00
dependabot[bot] 4416b9fa09 build(deps): bump docker/login-action from 4.6.0 to 4.7.0 (#22155) 2026-11-05 20:03:54 +01:00
Pujitha Paladugu bba1b68082 prune: report failure to list pack files as a fatal error
Motivation: when listing pack files fails during prune (for example due
to a request timeout), the error was returned unwrapped and main printed
it with "%+v", which dumps a stack trace. As discussed in the issue, the
error needs one more level of wrapping before it can be treated as a
fatal error.

Approach: in decidePackAction, wrap an error from listing pack files
with errors.Fatalf("failed to list pack files: %v"). Errors that are
already fatal (e.g. ErrSizeNotMatching) and errors after context
cancellation are returned unchanged. The underlying error is preserved
via Unwrap. Retry log messages are unchanged; only the final error
output is shortened and says where the failure occurred.

Validation: `go test ./internal/repository/ -run Prune` and
`go test ./cmd/restic/ -run Prune` pass. The new test
TestPrunePackListError (backend whose pack list fails) fails without
the change and passes with it. I did not reproduce a real REST backend
timeout.

Report: https://github.com/restic/restic/issues/22120
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5-5 (via Claude Code)
2026-10-18 12:58:49 -07:00
wjc dd09b6bd01 docs: add FAQ for shared versus separate repositories (#22106) 2026-10-18 14:23:55 +00:00
MikeeI adc0284113 copy: avoid a full index scan for disabled debug output (#22103) 2026-10-18 13:50:05 +00:00
Michael Eischer 25aa69dbc7 Merge pull request #22089 from restic/dependabot/go_modules/cloud.google.com/go/storage-1.68.0
build(deps): bump cloud.google.com/go/storage from 1.64.0 to 1.69.0
2026-10-18 15:37:57 +02:00
Nicolai Scheer b4be15a7d9 cmd/restic: fix repair snapshots test on 32-bit platforms (#22098) 2026-10-18 13:36:23 +00:00
dependabot[bot] b1d146035a build(deps): bump cloud.google.com/go/storage from 1.64.0 to 1.69.0
Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.64.0 to 1.69.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.64.0...compute/v1.69.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-version: 1.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-18 13:18:42 +00:00
Michael Eischer 885e6b6e71 Merge pull request #22121 from MichaelEischer/go-1.27
bump minimum go version to 1.26
2026-10-18 15:16:28 +02:00
Michael Eischer cb1d66a398 add changelog go version bump 2026-10-17 22:57:11 +02:00
Michael Eischer 5d745e2ead windows: use os.OpenFile with O_FILE_FLAG_* instead of low-level API 2026-10-17 22:57:11 +02:00
Michael Eischer 2497d99f9f fix linter error 2026-10-17 22:57:11 +02:00
Michael Eischer 35f15c398a apply go fix ./... 2026-10-17 22:57:11 +02:00
Michael Eischer a9d74f178e bump minimum go version to 1.26 2026-10-17 22:37:36 +02:00
dependabot[bot] e40a4a165e build(deps): bump github.com/ProtonMail/go-crypto from 1.4.1 to 1.5.2 (#22090)
Signed-off-by: dependabot[bot] <support@github.com>
2026-10-17 21:40:50 +02:00
Grivn d714e22605 data: read empty trees from older repaired snapshots
Older repair snapshots versions serialized missing subtrees as nodes:null.
The streaming decoder rejects these trees, preventing prune and other
commands from traversing snapshots that previous releases could read.

Accept null as an empty node list. Add decoder coverage and a regression
that prunes, checks and restores a snapshot with a legacy empty subtree.
2026-10-16 01:58:41 +08:00
Winfried Plappert 9da3b87b07 forget - missing lock for 'failedSnIDs' (#22100) 2026-10-11 22:15:25 +02:00
JayandMichael Eischer 519a979107 ci: update golangci-lint to v2.14 (#22111)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-10-11 16:33:41 +00:00
dependabot[bot] ca1c625227 build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob from 1.8.0 to 1.8.1 (#22088)
Signed-off-by: dependabot[bot] <support@github.com>
2026-10-11 17:49:52 +02:00
Michael Eischer 5127c4abf9 Fix tar extraction errors in sandboxes (#22071) 2026-09-25 22:08:18 +02:00
Michael Eischer 8e917cf0bd Merge pull request #22069 from MichaelEischer/go-1.27
CI: Add go 1.27
2026-09-25 22:05:52 +02:00
Michael Eischer 818dd21a4f index: hash blob IDs with maphash.Bytes (#22070)
Avoid constructing a maphash.Hash on every lookup and insert.
2026-09-25 22:05:12 +02:00
Michael Eischer 6adedec6b4 repository: use synctest for lock tests (#22038)
Replace select based on context/timer with deterministic pattern.
The tests depend on timing. Thus, use synctest which provides
deterministic clock updates and also speeds up test execution by
skipping sleep times.
2026-09-20 22:05:21 +02:00
Michael Eischer 9d17700830 update golangci-lint ignore 2026-09-20 22:01:08 +02:00
Michael Eischer 1cce3790f4 gofmt 2026-09-20 21:28:55 +02:00
Michael Eischer 1765e36f95 CI: Add go 1.27 2026-09-20 21:28:40 +02:00
dependabot[bot] 9c86adb783 build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.2 (#22068)
Signed-off-by: dependabot[bot] <support@github.com>
2026-09-20 18:38:57 +00:00
Sergey Kolomiichuk ab17711e31 selfupdate: replace deprecated golang.org/x/crypto/openpgp with ProtonMail/go-crypto (#21997) 2026-09-20 18:33:24 +00:00
dependabot[bot] 444c1cb221 build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0 (#22044)
Signed-off-by: dependabot[bot] <support@github.com>
2026-09-20 20:19:54 +02:00
Michael Eischer c0acea6d75 Merge pull request #22054 from user01010111/docs/env-option-precedence
doc: clarify environment variable precedence
2026-09-20 20:18:07 +02:00
dependabot[bot] 7710556df1 build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity from 1.14.0 to 1.14.1 (#22043)
Signed-off-by: dependabot[bot] <support@github.com>
2026-09-20 18:14:39 +00:00
jf nz a428df74c9 doc: clarify environment variable precedence 2026-09-20 20:07:48 +02:00