Michael Eischer
56ac8360c7
data: split node and snapshot code from restic package
2025-10-03 19:10:39 +02:00
Michael Eischer
df7924f4df
node: report error on xattr retrieval using standard error logging
2025-10-03 18:55:46 +02:00
Michael Eischer
6bd85d2412
reduce usages of globalOptions variable
2025-10-03 18:22:42 +02:00
Michael Eischer
d491c1bdbf
use errors.Fatalf instead of custom formatting
2025-09-24 22:11:54 +02:00
Michael Eischer
7257cd2e5f
extra linters
2025-09-21 22:24:35 +02:00
Michael Eischer
60d80a6127
Fix linter warnings
2025-09-21 22:24:15 +02:00
gregoster
839c38b4c4
EOPNOTSUPP can be returned if the filesystem does not support xattrs ( #5344 )
...
---------
Co-authored-by: Greg Oster <oster@netbsd.org >
2025-09-05 19:09:27 +00:00
Michael Eischer
9f39e8a1d3
fs/reader: return proper error on invalid filename
2025-04-11 22:07:31 +02:00
Michael Eischer
ddd48f1e98
fs/reader: test file not exist case
2025-04-11 21:57:45 +02:00
Michael Eischer
6e91ea3397
fs/reader: use test helpers
2025-04-11 21:54:15 +02:00
Michael Eischer
e7c1e4f1ff
fs/reader: deduplicate test code
2025-04-11 21:50:47 +02:00
Michael Eischer
70e1037a49
fs/reader: fix open+stat handling
2025-04-11 21:49:25 +02:00
Michael Eischer
19f48084ea
fs/reader: use modification time for file and directories
...
This ensures that a fixed input generates a fully deterministic output
file structure.
2025-04-11 21:46:24 +02:00
Michael Eischer
3a995172b7
fs: rewrite Reader to build fs tree up front
...
This adds proper support for filenames that include directories. For
example, `/foo/bar` would result in an error when trying to open `/foo`.
The directory tree is now build upfront. This ensures let's the
directory tree construction be handled only once. All accessors then
only have to look up the constructed directory entries.
2025-04-11 21:37:40 +02:00
Martin Smith
d2c5241961
Revert a fix that broke compile of sd_windows.go.
2025-03-22 18:27:09 +00:00
Martin Smith
3788605127
Rename unused parameters to '_'.
2025-03-22 18:20:30 +00:00
Martin Smith
092899df8b
Remove unnecessary type conversions.
2025-03-22 18:20:30 +00:00
Martin Smith
2099ec1cd6
Remove import aliases that match package name.
2025-03-22 18:20:30 +00:00
Snshadow
6301250d83
fix: Windows VSS Event ID 8194 ( #5170 )
2025-01-26 15:25:38 +00:00
Michael Eischer
5e8654c71d
restore: fix xattr filter test on windows
2025-01-18 23:07:39 +01:00
Tesshu Flower
44cef25077
remove bad test xattr
...
Signed-off-by: Tesshu Flower <tflower@redhat.com >
2025-01-10 21:12:03 -05:00
Tesshu Flower
24422e20a6
restore: xattr restore filter tests
...
Signed-off-by: Tesshu Flower <tflower@redhat.com >
2025-01-10 15:13:44 -05:00
Tesshu Flower
f457b16b23
update nodeRestoreExtendedAttributes() for win
...
- also other platforms
- move xattr include/exclude filter parsing into
separate func
Signed-off-by: Tesshu Flower <tflower@redhat.com >
2025-01-10 15:13:44 -05:00
Tesshu Flower
af839f9548
restore: exclude/include xattrs
...
For: https://github.com/restic/restic/issues/5089
Signed-off-by: Tesshu Flower <tflower@redhat.com >
2025-01-10 15:13:40 -05:00
Michael Eischer
bd4ce8aac1
Merge pull request #4990 from m-wild/exclude-cloud-files
...
backup: allow excluding online-only cloud files
2025-01-13 21:24:53 +01:00
Michael Wildman
da71e77b28
backup: allow excluding online-only cloud files
2025-01-13 21:11:23 +01:00
knbr13
bbb492ee65
remove duplicate imports
2025-01-05 13:53:20 +02:00
Tyson Key
37969ae8e3
Enable xattr support, on NetBSD 10+
2024-12-18 16:52:44 +00:00
Aneesh N
6808004ad1
Refactor extended attributes and security descriptor helpers to use go-winio ( #5040 )
...
* Refactor ea and sd helpers to use go-winio
Import go-winio and instead of copying the functions to encode/decode extended attributes and enable process privileges for security descriptors, call the functions defined in go-winio.
2024-12-09 21:48:38 +01:00
Michael Eischer
0bf8af7188
Merge pull request #5138 from vmlemon/issue-5131
...
Implement basic DragonFlyBSD support
2024-11-30 17:32:59 +01:00
Michael Eischer
9a99141a5f
fs: remove os.FileInfo from fs.ExtendedFileInfo
...
Only the `Sys()` value from os.FileInfo is kept as field `sys` to
support Windows. The os.FileInfo removal ensures that for values like
`ModTime` that existed in both data structures there's no more confusion
which value is actually used.
2024-11-30 17:07:36 +01:00
Michael Eischer
641390103d
fs: inline ExtendedStat
2024-11-30 16:19:16 +01:00
Michael Eischer
5df6bf80b1
fs: retry vss creation on VSS_E_SNAPSHOT_SET_IN_PROGRESS error
...
Depending on the change packages, the VSS tests from ./cmd/restic and
the fs package may overlap in time. This causes the snapshot creation to
fail. Add retries in that case.
2024-11-30 16:07:18 +01:00
Tyson Key
3c0ceda536
Add basic support for DragonFlyBSD
2024-11-30 15:42:15 +01:00
Michael Eischer
8642049532
Merge pull request #5143 from MichaelEischer/fs-handle-interface
...
fs: rework FS interface to be handle based
2024-11-30 15:29:31 +01:00
Michael Eischer
b51bf0c0c4
fs: test File implementation of Local FS
2024-11-16 16:09:17 +01:00
Michael Eischer
d7f4b9db60
fs: deduplicate placeholders for generic and xattrs
2024-11-16 16:09:17 +01:00
Michael Eischer
087f95a298
fs: make generic and extended attrs independent of each other
2024-11-16 15:38:56 +01:00
Michael Eischer
6084848e5a
fs: fix O_NOFOLLOW for metadata handles on Windows
2024-11-16 15:38:56 +01:00
Michael Eischer
48dbefc37e
fs / archiver: convert to handle based interface
...
The actual implementation still relies on file paths, but with the
abstraction layer in place, an FS implementation can ensure atomic file
accesses in the future.
2024-11-16 12:56:23 +01:00
Michael Eischer
2f2ce9add2
fs: remove Stat from FS interface
2024-11-16 12:56:23 +01:00
Michael Eischer
623ba92b98
fs: drop unused permission parameter from OpenFile
2024-11-16 12:56:23 +01:00
Michael Eischer
b402e8a6fc
fs: stricter enforcement to only call readdir on a directory
...
Use O_DIRECTORY to prevent opening any other than a directory in
readdirnames.
2024-11-16 12:56:23 +01:00
Michael Eischer
a73ae7ba1a
restore: improve error if timestamp fails to restore
2024-11-11 21:37:28 +01:00
Michael Eischer
408ec41a1d
Merge pull request #5123 from MichaelEischer/fix-removable-media-handling
...
fs: fallback to low privilege security descriptors on access denied
2024-11-03 21:35:38 +01:00
Michael Eischer
f9a90aae89
fs: fallback to low privilege security descriptors on access denied
2024-11-01 19:10:52 +01:00
Michael Eischer
289159beaf
fs: remove redundant fixpath in vss code
2024-11-01 19:03:45 +01:00
Michael Eischer
4052a5927c
fs: move getVolumePathName function
2024-11-01 19:03:45 +01:00
Michael Eischer
b3b173a47c
fs: use non existing vss path to avoid flaky test
...
The test used \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1 , which if
it exists and supports extended attributes can cause the test to fail.
2024-11-01 15:38:05 +01:00
Michael Eischer
62af5f0b4a
restic: test path handling of volume shadow copy root path
2024-10-31 22:06:50 +01:00