restic copy --batch: a fresh start from commit 382616747

Instead of rebasing my code, I decided to start fresh, since WithBlobUploader()
has been introduced.

changelog/unreleased/issue-5453:
doc/045_working_with_repos.rst:
the usual

cmd/restic/cmd_copy.go:
gather all snaps to be collected - collectAllSnapshots()
run overall copy step - func copyTreeBatched()
helper copySaveSnapshot() to save the corresponding snapshot

internal/repository/repack.go:
introduce wrapper CopyBlobs(), which passes parameter `uploader restic.BlobSaver` from
WithBlobUploader() via copyTreeBatched() to repack().

internal/backend/local/local_windows.go:
I did not touch it, but gofmt did: whitespace
This commit is contained in:
Winfried Plappert
2025-11-19 07:09:24 +00:00
parent 3826167474
commit b87f7586e4
6 changed files with 370 additions and 24 deletions
+12
View File
@@ -0,0 +1,12 @@
Enhancement: `restic copy` can now spool packfiles across muliple snapshots
When using `restic copy` used to save all newly created packfiles when finishing one snapshot,
even when the actual packfile size was quite small. This applied particularly to
incremental backups, when there was only small changes between individual backups.
When using the new option `--batch`, `restic copy` now creates one large request list
which contains all blobs from all snapshots to be copied and then executes the
copy operation.
https://github.com/restic/restic/issues/5175
https://github.com/restic/restic/pull/5464