Skip to content

Fix VSS metadata error (v0.17.2)#5110

Merged
MichaelEischer merged 5 commits intorestic:patch-releasefrom
MichaelEischer:fix-vss-root-volume-patch
Nov 3, 2024
Merged

Fix VSS metadata error (v0.17.2)#5110
MichaelEischer merged 5 commits intorestic:patch-releasefrom
MichaelEischer:fix-vss-root-volume-patch

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Oct 31, 2024

What does this PR change? What problem does it solve?

Fix VSS metadata error in restic 0.17.2, see #5107 for details.

Was the change previously discussed in an issue or on the forum?

Fixes #5107

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

@MichaelEischer MichaelEischer force-pushed the fix-vss-root-volume-patch branch from 6f6a1bc to 7ad2601 Compare October 31, 2024 18:41
@MichaelEischer MichaelEischer changed the title WIP: Fix vss root volume patch Fix vss root volume patch Oct 31, 2024
@MichaelEischer MichaelEischer changed the title Fix vss root volume patch Fix VSS metadata error (v0.17.2) Oct 31, 2024
@MichaelEischer MichaelEischer force-pushed the fix-vss-root-volume-patch branch 2 times, most recently from 26190d1 to 686ef71 Compare October 31, 2024 20:55
Paths that only contain the volume shadow copy snapshot name require
special treatment. These paths must end with a slash for regular file
operations to work.
Extended attributes and security descriptors apparently cannot be
retrieved from a vss volume. Fix the volume check to correctly detect
vss volumes and just completely disable extended attributes for volumes.
@MichaelEischer MichaelEischer force-pushed the fix-vss-root-volume-patch branch from 686ef71 to 9622794 Compare October 31, 2024 21:07
@MichaelEischer
Copy link
Copy Markdown
Member Author

While working on #5112, I've noticed that the underlying root cause is different than expected. Apparently it makes a difference whether \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyXX or \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyXX\ (note the trailing backslash) is used. Only the latter can be properly used for file operations. Thus, the correct fix is to add support for vss paths to fixpath to make sure the trailing slash exists when trying to access the root path of a volume.

Copy link
Copy Markdown
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@MichaelEischer MichaelEischer merged commit 62222ed into restic:patch-release Nov 3, 2024
@MichaelEischer MichaelEischer deleted the fix-vss-root-volume-patch branch November 3, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants