Repository navigation
extract --continue: skip complete dirs, count skipped files in --progress - #10506
Open
ThomasWaldmann wants to merge 1 commit into
Open
ThomasWaldmann wants to merge 1 commit into
ThomasWaldmann wants to merge 1 commit into
Conversation
…ress, refs borgbackup#6857 Directories: same_item() already considered an existing directory with the archived mode and mtime as complete, but do_extract never passed continue_extraction when restoring directory metadata, so all directories got their metadata restored again. --progress: the total includes the files that --continue skips, but their size was never added to the progress, so the percentage stayed far below the real one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10506 +/- ##
=======================================
Coverage 89.12% 89.12%
=======================================
Files 103 103
Lines 19783 19785 +2
Branches 3099 3100 +1
=======================================
+ Hits 17631 17633 +2
- Misses 1490 1492 +2
+ Partials 662 660 -2 ☔ View full report in Codecov by Harness. |
This branch has not been deployed
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.
Two small fixes for
borg extract --continue, refs #6857.Directories
same_item()already treats an existing directory with the archived mode and mtime as complete (b85ad47), butdo_extractnever passedcontinue_extractionwhen restoring directory metadata. As a result, every directory got chown/chmod/ACLs/xattrs/times set again. The result was still correct, just slower. Both directory metadata passes now pass the flag. The first pass, which creates directories, is unchanged.A directory whose content was changed by this run gets a new mtime, so it still gets its metadata restored.
test_extract_continuechecked only inode and mtime, which come out the same either way. It now also checks that dir1's ctime is unchanged.--progress
The progress total includes the files that
--continueskips, but their size was never added to the progress counter. The percentage therefore stayed far below the real one, e.g. 0% while extracting the last 10% of the data. Skipped files now advance the progress by their size.New test:
test_extract_continue_progress.Both new assertions fail without the fix and pass with it. The
--continuedocs in the extract epilog now mention directories.🤖 Generated with Claude Code