1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-09 13:53:03 +00:00
Commit graph

2376 commits

Author SHA1 Message Date
Michael Eischer
4a9603d253 fs: test correct xattr handling for symlinks 2024-11-30 19:17:25 +01:00
Michael Eischer
088bfac903 fs: test both fd and path-based implementation 2024-11-30 19:17:25 +01:00
Michael Eischer
9a0259cd0f fs: enable fd-based handles on Linux/macOS/Windows 2024-11-30 19:17:25 +01:00
Michael Eischer
4b33540148 fs: wire up fd-based handles for fs.Local 2024-11-30 19:17:25 +01:00
Michael Eischer
1b87468531 fs: add file handle helpers for reading 2024-11-30 19:17:25 +01:00
Michael Eischer
f1ae5a21e2 fs: implement file reopening 2024-11-30 19:17:25 +01:00
Michael Eischer
c0d727dfed fs: correctly handle O_NOFOLLOW for xattr / generic attribute retrieval 2024-11-30 19:17:25 +01:00
Michael Eischer
67c0387cfe fs: sanitize path in fd based xattr reading on Linux
The xattrs are read from /proc/self/fd/%d but instead show the original
file path to make the error message more useful.
2024-11-30 19:17:25 +01:00
Michael Eischer
6e4c7f9b50 fs: add file handle based xattrs 2024-11-30 19:17:25 +01:00
Michael Eischer
e7d2922019 fs: make generic attribute reading file handle based 2024-11-30 19:17:25 +01:00
Michael Eischer
2a5bbf170d fs: implement and use filehandle based readlink
The implementations are 90% copy&paste from the go standard library as
the existing code does not offer any way to read the symlink target
based on a filehandle.

Fall back to a standard readlink on platforms other than Linux and
Windows as those either don't even provide the necessary syscall or in
case of macOS are not yet available in Go.
2024-11-30 19:17:25 +01:00
Michael Eischer
8072b999a6 fs: add file handle helpers 2024-11-30 19:17:25 +01:00
Michael Eischer
ea1446f50b fs: prepare fd based metadataHandle
Add the skeleton, but leave filling in the details to later commits.
2024-11-30 19:17:25 +01:00
Michael Eischer
e70fa4f9f5 fs: abstract away filesystem ops from nodeFromFileInfo 2024-11-30 19:17:25 +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
847b2efba2 archiver: remove fs parameter from fileChanged function 2024-11-30 16:19:16 +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
c5fb46da53 archiver: ignore files removed in the meantime 2024-11-30 15:30:42 +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
8644bb145b
Merge pull request #5134 from MichaelEischer/better-time-restore-error
restore: improve error if timestamp fails to restore
2024-11-30 13:09:33 +01:00
Michael Eischer
b51bf0c0c4 fs: test File implementation of Local FS 2024-11-16 16:09:17 +01:00
Michael Eischer
6cb19e0190 archiver: fix file type change test
The test did not test the case that the type of a file changed
unexpectedly.
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
f8031561f2 archiver: deduplicate error filtering 2024-11-15 17:58:06 +01:00
Michael Eischer
49ef3ebec3 restic: add missing space in error message 2024-11-15 17:52:09 +01:00
Michael Eischer
1133498ef8
Merge pull request #5046 from konidev20/fix-gh-4521-azure-blob-storage-add-support-for-access-tiers
azure: add support for access tiers hot, cool and cold
2024-11-11 22:01:52 +01:00
Michael Eischer
9c758313e3
Merge pull request #5119 from MichaelEischer/backup-json-start-end-time
backup: include start and end time in json output
2024-11-11 21:50:30 +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
270e7b7679
Merge pull request #5122 from restic/bump-golangci-lint
Bump go and golangci lint version
2024-11-03 21:34:25 +01:00
Michael Eischer
d5bd3fcda5
Merge pull request #5112 from MichaelEischer/fix-vss-root-volume
Fix VSS metadata error (master)
2024-11-03 21:30:39 +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
d3c3390a51 ls: proper error handling if output is not possible 2024-11-01 17:07:43 +01:00
Michael Eischer
569a117a1d improve fprintf related error handling 2024-11-01 17:07:43 +01:00
Michael Eischer
e65f4e2231 backup: include start and end time in json output
The timestamps were already stored in the created snapshot.
2024-11-01 16:31:34 +01:00
Michael Eischer
ded9fc7690
Merge pull request #5101 from MichaelEischer/sftp-load-error
sftp: check for broken connection in Load/List operation
2024-11-01 16:05:29 +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
71c185313e sftp: check for broken connection in Load/List operation 2024-11-01 15:33:27 +01:00
Michael Eischer
58dc4a6892 backend/retry: hide final log for stat() method
stat is only used to check the config file's existence. We don't want
log output in this case.
2024-11-01 15:17:54 +01:00