Michael Eischer
e91a456656
Merge pull request #5061 from MichaelEischer/fix-timestamp-restore-windows
...
fs: fix restoring timestamps on older Windows versions for long paths
2024-10-16 20:47:17 +02:00
Michael Eischer
e21496f217
Merge pull request #5074 from greatroar/dump
...
dump: Simplify writeNode and use fewer goroutines
2024-10-16 18:33:35 +00:00
Michael Eischer
0c0d8b8cfd
Merge pull request #5083 from greatroar/errors
...
Some error handling patches
2024-10-16 18:22:49 +00:00
greatroar
2b609d3e77
errors, fs: Replace CombineErrors with stdlib Join
...
This does not produce exactly the same messages, as it inserts newlines
instead of "; ". But given how long our error messages can be, that
might be a good thing.
2024-10-05 10:56:40 +02:00
greatroar
19653f9e06
fs: Simplify NodeCreateAt
2024-10-05 10:56:39 +02:00
greatroar
e10e2bb50f
fs: Include filename in mknod errors
2024-10-05 10:56:39 +02:00
greatroar
b5c28a7ba2
internal/restic: Use IDSet.Clone + use maps package
...
One place where IDSet.Clone is useful was reinventing it, using a
conversion to list, a sort, and a conversion back to map.
Also, use the stdlib "maps" package to implement as much of IDSet as
possible. This requires changing one caller, which assumed that cloning
nil would return a non-nil IDSet.
2024-10-03 21:14:29 +02:00
greatroar
8c7a6daa47
dump: Simplify writeNode and use fewer goroutines
...
This changes Dumper.writeNode to spawn loader goroutines as needed
instead of as a pool. The code is shorter, fewer goroutines are spawned
for small files, and crash dumps (also for unrelated errors) should be
smaller.
2024-09-30 17:24:05 +02:00
Michael Eischer
4469fe1575
fs: fix restoring timestamps on Windows for long paths
2024-09-15 18:28:11 +02:00
Michael Eischer
efec1a5e96
Merge pull request #5045 from MichaelEischer/fix-preallocate-eintr
...
Linux: retry preallocate if interrutped by signal
2024-09-14 19:17:51 +02:00
Damien Clark
4795143d6d
cache: fix race condition in cache cleanup
...
Fix multiple restic processes executing concurrently and racing to remove obsolete snapshots.
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2024-09-14 18:07:46 +02:00
Michael Eischer
34fe73ea42
fs: retry preallocate on Linux if interrupted by signal
2024-09-07 16:39:40 +02:00
Srigovind Nayak
b69c6408a6
forget: make oldest snapshot marker more strict
...
Now, a snapshot is only marked as oldest if it's the last in the list AND its values matches the last seen value for that bucket.
Also, updated the corresponding golden files for the tests.
2024-09-07 15:07:23 +05:30
Srigovind Nayak
d656a50852
forget: update tests to reflect specific reasons for keeping oldest snapshots in a group
2024-09-07 15:07:23 +05:30
Srigovind Nayak
87f30bc787
forget: indicate why the oldest snapshot in a group is kept
...
When the oldest snapshot in the
list is retained, the reason is now prefixed with "oldest" to clearly
indicate why it's being kept.
2024-09-07 15:07:23 +05:30
Michael Eischer
9a6059eb71
Merge pull request #5032 from dropbigfish/master
...
chore: fix some function name comments
2024-09-01 21:52:26 +00:00
dropbigfish
6f9513d88c
chore: fix some function names
...
Signed-off-by: dropbigfish <fillfish@foxmail.com>
2024-09-01 00:54:39 +08:00
Michael Eischer
b91ef3f1ff
fs: remove dead code
2024-08-31 18:40:36 +02:00
Michael Eischer
e2bce1b9ee
fs: move WindowsAttributes definition back to restic package
2024-08-31 18:40:36 +02:00
Michael Eischer
ebdd946ac1
fs: unexport nodeRestoreTimestamps
2024-08-31 18:40:36 +02:00
Michael Eischer
2aa1e2615b
fs: fix comments
2024-08-31 18:40:36 +02:00
Michael Eischer
6c16733dfd
fs: remove unused methods from File interface
2024-08-31 18:40:36 +02:00
Michael Eischer
f0329bb4e6
fs: replace statT with ExtendedFileInfo
2024-08-31 18:40:36 +02:00
Michael Eischer
6d3a5260d3
fs: unexport a several windows functions
2024-08-31 18:40:36 +02:00
Michael Eischer
cf051e777a
fs: remove Readdir method from File interface
2024-08-31 18:20:41 +02:00
Michael Eischer
cc7f99125a
minimize usage of internal/fs in tests
2024-08-31 18:20:41 +02:00
Michael Eischer
65a7157383
mount: use os instead of fs package
2024-08-31 18:20:41 +02:00
Michael Eischer
24f4e780f1
backend: consistently use os package for filesystem access
...
The go std library should be good enough to manage the files in the
backend and cache folders.
2024-08-31 18:20:40 +02:00
Michael Eischer
ca1e5e10b6
add proper constants for node type
2024-08-31 18:20:01 +02:00
Michael Eischer
7bb92dc7bd
archiver: use ExtendedStat from FS interface
...
With this change, NodeFromFileInfo is the last function that bypasses
the FS interface in the archiver.
2024-08-31 18:05:09 +02:00
Michael Eischer
e79dca644e
fs: unexport DeviceID
2024-08-31 18:04:53 +02:00
Michael Eischer
70fbad6623
archiver: minimize imports
2024-08-31 18:04:37 +02:00
Michael Eischer
6fd5d5f2d5
archiver: move helper functions to combine rejects
2024-08-31 18:04:22 +02:00
Michael Eischer
f1585af0f2
move include/exclude options to filter package
2024-08-31 18:04:07 +02:00
Michael Eischer
41c031a19e
backup: move RejectFuncs to archiver package
2024-08-31 18:03:35 +02:00
Michael Eischer
f9dbcd2531
backup: convert reject funcs to use FS interface
...
Depending on parameters the paths in a snapshot do not directly
correspond to real paths on the filesystem. Therefore, reject funcs must
use the FS interface to work correctly.
2024-08-31 18:03:02 +02:00
Michael Eischer
c6fae0320e
archiver: hide implementation details
2024-08-31 17:52:45 +02:00
Michael Eischer
507842b614
fs: remove Open method from FS interface
2024-08-31 17:37:25 +02:00
Michael Eischer
263709da8c
fs: unexport isListxattrPermissionError
2024-08-31 17:37:25 +02:00
Michael Eischer
80ed863aab
repository: remove redundant cleanup code
...
The temp files used by the packer manager are either delete after
creation (unix) or marked as delete on close (windows). Thus, no
explicit cleanup is necessary.
2024-08-31 17:37:25 +02:00
Michael Eischer
0ddb4441d7
fs: clean up helper functions
2024-08-31 17:37:25 +02:00
Michael Eischer
fc549c9462
cleanup imports
2024-08-31 17:37:25 +02:00
Michael Eischer
b9b32e5647
restic: extract Node filesystem code to fs package
2024-08-31 17:37:25 +02:00
Michael Eischer
a2e54eac64
restic: simplify nodeCreateFileAt
...
The code to write the file content is never used.
2024-08-31 17:37:25 +02:00
Michael Eischer
5644079707
restic: prepare extraction of fs code from Node
2024-08-31 17:37:25 +02:00
Michael Eischer
97f696b937
backend: remove dead code
2024-08-31 17:25:24 +02:00
Michael Eischer
af989aab4e
backend/layout: unexport fields and simplify rest layout
2024-08-31 17:25:24 +02:00
Michael Eischer
6024597028
drop support for s3legacy layout
2024-08-31 17:25:24 +02:00
Michael Eischer
943b6ccfba
index: remove support for legacy index format
2024-08-31 17:12:43 +02:00
Michael Eischer
a5533344f9
Merge pull request #5028 from MichaelEischer/windows-allow-specifying-volumes
...
backup: support specifying volume instead of path on Windows
2024-08-31 16:43:20 +02:00