Commit Graph

2222 Commits

Author SHA1 Message Date
Winfried Plappert 75de8b54e6 restic check and restic repair packs: treat missing packfiles the same as damaged and truncated packfiles (#21845)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-06-28 12:09:42 +02:00
Winfried Plappert 9e1a526611 Fix broken snapshots via restic repair snapshots --forget (#21907)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-06-27 22:09:10 +02:00
Michael Eischer 804ff4bc95 find: add test for listing blobs from corrupt pack files 2026-06-26 22:16:55 +02:00
Michael Eischer 9670cd7459 find: fix fallback to index if pack cannot be listed
`find` would only look up completely missing pack files in the index. A
still existing but broken pack file would result in an error.
2026-06-26 22:16:55 +02:00
Michael Eischer 634e9b2411 find: check blobIDs/treeIDs presence by length
Depending on the code path, the map could be initialized but stay empty.
2026-06-26 21:46:30 +02:00
Gilbert Gilb's db03aed816 feat(backends/s3): add warmup support for check command (#5248) 2026-06-25 20:46:55 +02:00
Michael Eischer 4e8eea7ab4 Merge pull request #21902 from restic/speedup-test
Cut local test suite execution time in half
2026-06-24 21:34:55 +02:00
Michael Eischer 981adc47ac snapshots: improve wording for timezone information (#21913) 2026-06-24 19:49:07 +02:00
Michael Eischer 7134577c56 use constants from cobra for shell completion helper names (#21905) 2026-06-22 22:58:26 +02:00
Winfried Plappert d30d6b6281 backup - show excluded files and directories in verbose mode - text/JSON (#21887) 2026-06-21 16:11:42 +00:00
Eyüp Can Akman 8d7679c831 backup: skip source paths that cannot be accessed (#21852) 2026-06-21 17:16:16 +02:00
Michael Eischer 369da8a770 snapshots: revert default --lastest behavior to pre-0.19.0
the changed behavior now only applies when using `--group-by`.
2026-06-21 15:28:22 +02:00
Michael Eischer 9f84c80056 snapshots: cleanup handling of deprecated --last option 2026-06-21 15:28:22 +02:00
Michael Eischer 6070462465 backup: move options finalization to BackupOptions.Finalize 2026-06-21 15:28:22 +02:00
Michael Eischer 1029fe6dd0 list packs snapshot: include actual error in error message (#21903) 2026-06-21 15:27:19 +02:00
Michael Eischer c6a064b68b mount: disable debug log for test
I don't recall any recent problems with that test.
2026-06-20 22:04:07 +02:00
Michael Eischer d5267f03e0 use fastest compression in integration tests 2026-06-20 20:00:17 +02:00
Michael Eischer 5683224a3c layout: skip creation of pack subdirectories in integration tests
Each time a local backend is created, the local backend also creates all
shard subdirectories. For the integration tests this has the downside
that this results in ~120 (number of test) * 256 (number of directories)
= 30k directories that are created unnecessarily. This significantly
slows down test execution and cleanup.
2026-06-20 20:00:17 +02:00
Michael Eischer 71064fac10 mount: decrease sleep to speed up test 2026-06-20 20:00:17 +02:00
Michael Eischer f394723aa2 inject crypto keys for integration tests 2026-06-20 20:00:17 +02:00
Michael Eischer 6c509f7ac1 Correctly pair backend/restic.FileType with APIs
Use backend.FileType to interact with the backend. And restic.FileType
to interact with the repository.
2026-06-20 19:15:40 +02:00
Michael Eischer 5cd39d01c1 internal/data: extract HardlinkIndex from restorer
The HardlinkIndex is also used by `cmd_stats`, thus place it in a shared
package.
2026-06-20 17:49:20 +02:00
Michael Eischer 61708772a2 mount: use existing HasPathPrefix helper
replaces the custom isInside helper to check path nesting
2026-06-20 17:49:20 +02:00
Michael Eischer d9d54a505e restic: move Printer interface from internal/ui/progress
Move Printer and NewNoopPrinter to internal/restic so repository does
not have to import the ui packages.
2026-06-20 17:49:20 +02:00
Michael Eischer 0f4236cb39 repository: return unlock func from LockRepo
Drop the Unlocker interface and return the unlock callback directly
from LockRepo, simplifying callers that only need to defer unlock().
2026-06-20 17:48:35 +02:00
Winfried Plappert 284daaf0b4 restic list pack snapshotID - create lists of packfiles for a given snapshot as text (#5396)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-06-20 15:46:44 +00:00
Michael Eischer 6b88b072e0 forget: fix error handling if snapshot key cannot be marshaled 2026-06-14 16:37:58 +02:00
Michael Eischer 7d36449ea8 repository: change LoadBlob, LookupBlob and LookupBlobSize to BlobHandles (#21857) 2026-06-14 15:30:00 +02:00
Michael Eischer 0536e15bbf snapshots: show location name instead of current timezone (#21877) 2026-06-14 14:02:20 +02:00
Michael Eischer ae96b2a0f8 mount: fix crash in mountpoint validation (#21879) 2026-06-14 13:55:26 +02:00
Michael Eischer b892b1a150 repository: move lock file handling from restic package 2026-06-13 21:31:23 +02:00
Michael Eischer 3ee465d363 repository: rename Lock function to LockRepo
Rename `Lock()` to `LockRepo()` to make room for the `Lock` struct.
2026-06-13 21:24:37 +02:00
Michael Eischer 8e11f5747d restic: introduce Counter interface to decouple from ui/progress (#21861)
decouple restic and ui/progress packages
2026-06-13 21:08:18 +02:00
Michael Eischer b94ef4831d repository: add PackBlob.UncompressedCiphertextLength() 2026-06-13 20:05:05 +02:00
Michael Eischer e1e7fc8fb2 fs: unexport Local and expose via NewLocal 2026-06-13 19:50:49 +02:00
Michael Eischer 1acc19dac5 repository: unexport SearchKey 2026-06-13 19:49:03 +02:00
Michael Eischer 79e92b3bc6 repository: change Unlocker to interface 2026-06-13 19:48:47 +02:00
Michael Eischer 35af104749 restic: change LookupBlob to return []PackBlob 2026-06-13 17:54:58 +02:00
Michael Eischer ccb5ae1592 restic: change ListBlobs to return PackBlob
PackBlob is a limited interface that only exposes a part of the
information provided by PackedBlob. Most of the changes are switches
from direct value lookups to the interface methods, with a few larger
changes to let the tests still work.
2026-06-13 17:54:38 +02:00
Michael Eischer a9e0b46358 restic: list pack header via ListPackHandles
Replace ListPack with ListPackHandles so callers only receive blob
handles from pack headers, not layout fields.
2026-06-13 17:50:21 +02:00
Michael Eischer f186e1e458 repository: require *Repository for CopyBlobs
Prepare `CopyBlobs` to allow access to unexported methods of the
Repository struct. This requires changing the test to inject the number
of backend connections via a wrapped backend instead of a wrapped
repository.
2026-06-13 17:50:21 +02:00
Michael Eischer 14f86a462a stats: refactor ui progress printer into ui/stats 2026-06-13 17:00:11 +02:00
Michael Eischer 825d67ba4b backup,restore: move CalculateProgressInterval call to their ui package 2026-06-13 16:53:57 +02:00
Michael Eischer 0bbfb072af ui/progress: unexport NoopPrinter and add New* function 2026-06-13 16:53:57 +02:00
Michael Eischer e8ed2434cd ui: move NewProgressPrinter to ui/progress.NewTerminalPrinter 2026-06-13 16:53:54 +02:00
Michael Eischer dee28f5b0e ui/terminal: unexport New function 2026-06-13 16:53:30 +02:00
Michael Eischer bae49d00ee stats: hide progress bar for json output (#21871) 2026-06-13 15:13:26 +02:00
darkdragon-001 e5dba15367 Json prune (#5239)
Co-authored-by: Alexander Weiss <alex@weissfam.de>
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2026-06-13 10:38:57 +00:00
Michael Eischer e94ec65efb mount: unify mountpoint validation error messages 2026-06-12 22:30:53 +02:00
Michael Eischer 49f9e67520 mount: factor out mountpoint validation into helper 2026-06-12 22:29:45 +02:00