Skip to content

Fix extended attributes handling for VSS snapshots#4998

Merged
MichaelEischer merged 4 commits intorestic:masterfrom
zmanda:ea_vss_fix
Aug 15, 2024
Merged

Fix extended attributes handling for VSS snapshots#4998
MichaelEischer merged 4 commits intorestic:masterfrom
zmanda:ea_vss_fix

Conversation

@aneesh-n
Copy link
Copy Markdown
Contributor

@aneesh-n aneesh-n commented Aug 11, 2024

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

After the change in #4980 support for extended attributes for VSS snapshot based backups was disabled. This change allows extended attributes to be backed up for VSS snapshots as well.

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

Follow up to - #4980

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.

Copy link
Copy Markdown
Member

@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.

Just a few small nits, see below

Gracefully handle errors while checking for EA and add debug logs.
debug.Log("Error checking if extended attributes are supported for prepared volume name %s: %v", volumeName, err)
// There can be multiple errors like path does not exist, bad network path, etc.
// We just gracefully disallow extended attributes for cases.
return false, nil
Copy link
Copy Markdown
Contributor Author

@aneesh-n aneesh-n Aug 12, 2024

Choose a reason for hiding this comment

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

I think it will be much less intrusive to gracefully handle the errors and simple skip extended attributes since this is a side functionality. The other parts of the code can handle the path and file existence related errors instead.
There can be multiple errors like path does not exist, bad network path, etc.
Maybe we should show Warnings?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree, extended attributes aren't that important on Windows. Skipping them if we cannot detect whether they are supported is fine for me.

Maybe we should show Warnings?

Hmm, there's nothing a user can do about such warnings. A debug log entry should be enough for now.

Copy link
Copy Markdown
Member

@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. Thanks a lot for the fixes!

debug.Log("Error checking if extended attributes are supported for prepared volume name %s: %v", volumeName, err)
// There can be multiple errors like path does not exist, bad network path, etc.
// We just gracefully disallow extended attributes for cases.
return false, nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree, extended attributes aren't that important on Windows. Skipping them if we cannot detect whether they are supported is fine for me.

Maybe we should show Warnings?

Hmm, there's nothing a user can do about such warnings. A debug log entry should be enough for now.

@MichaelEischer MichaelEischer added this pull request to the merge queue Aug 15, 2024
Merged via the queue into restic:master with commit 80f2458 Aug 15, 2024
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