mirror of
https://github.com/restic/restic.git
synced 2026-08-03 04:32:17 +00:00
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:
@@ -54,6 +54,26 @@ func Repack(
|
||||
})
|
||||
}
|
||||
|
||||
/* the following code is a terrible hack, but there is currently no other way
|
||||
of calling the functionality in repack() without a lot duplication of code.
|
||||
|
||||
Repack() is still called from `restic prune` via plan.Execute() inside prune.go
|
||||
*/
|
||||
// CopyBlobs is a wrapper around repack(). The parameter 'uploader' is passed through
|
||||
// from WithBlobUploader() to CopyBlobs() via cmd/restic/cmd_copy.copyTree().
|
||||
func CopyBlobs(
|
||||
ctx context.Context,
|
||||
repo restic.Repository,
|
||||
dstRepo restic.Repository,
|
||||
uploader restic.BlobSaver,
|
||||
packs restic.IDSet,
|
||||
keepBlobs repackBlobSet,
|
||||
p *progress.Counter,
|
||||
logf LogFunc,
|
||||
) error {
|
||||
return repack(ctx, repo, dstRepo, uploader, packs, keepBlobs, p, logf)
|
||||
}
|
||||
|
||||
func repack(
|
||||
ctx context.Context,
|
||||
repo restic.Repository,
|
||||
|
||||
Reference in New Issue
Block a user