restic copy - add more status counters - issue #5175#5464
Merged
Conversation
Merged
4 tasks
MichaelEischer
requested changes
Oct 4, 2025
| for _, blob := range srcRepo.LookupBlob(blob.Type, blob.ID) { | ||
| if blob.Type == restic.TreeBlob { | ||
| countTreeBlobs++ | ||
| sizeTreeBlobs += blob.Length |
Member
There was a problem hiding this comment.
Length is the size on disk. Is that what we're interested in here?
Contributor
Author
There was a problem hiding this comment.
I personally am interested in the length on the disk, since this determined the runtime of the copy command.
| countTreeBlobs, ui.FormatBytes(uint64(sizeTreeBlobs)), len(treePackfiles)) | ||
| Verbosef(" %7d data blobs with a size %11s in %7d packfiles\n", | ||
| countDataBlobs, ui.FormatBytes(uint64(sizeDataBlobs)), len(dataPackfiles)) | ||
| Verbosef(" %7d all blobs with a size %11s in %7d packfiles\n", |
Member
There was a problem hiding this comment.
This feels rather redundant. Maybe just print how much data will be copied in total?
Contributor
Author
There was a problem hiding this comment.
Print only the the sum of all blobs.
MichaelEischer
left a comment
Member
There was a problem hiding this comment.
I just have one more small nit. I like the compact statistics output, if there's interest in more details we can still add those later on.
'copyTree()' now counts and sizes the blobs in 'copyBlobs' and prints them out via 'Verbosef()'.
cmd/restic/cmd_copy.go: add function copyStats() and call it before the actual copying starts. changelog/unreleased/pull-5319: rephrased wording of the statistics counters.
reword the description od the PR
fixed typo in changelog/unreleased/pull-5319
11e6720 to
3b71c44
Compare
MichaelEischer
approved these changes
Nov 16, 2025
MichaelEischer
left a comment
Member
There was a problem hiding this comment.
LGTM.
I've rebased the PR to fix the merge conflict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
'copyTree()' now counts and sizes the blobs in 'copyBlobs' and prints them out via 'Verbosef()'.
What does this PR change? What problem does it solve?
This PR addresses the issue raised in #5175
code has been added to count and size the changes collected in copyBlobs. These counts are printed out via Verbosef().
Was the change previously discussed in an issue or on the forum?
closes #5175
Checklist
changelog/unreleased/that describes the changes for our users (see template).