2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-23 13:17:42 +00:00
Commit Graph

2217 Commits

Author SHA1 Message Date
aneesh-n
19f487750e
Add test cases and handle volume GUID paths
Gracefully handle errors while checking for EA and add debug logs.
2024-08-11 19:25:58 -06:00
aneesh-n
849c441455
Gracefully handle invalid prepared volume names 2024-08-11 01:48:25 -06:00
aneesh-n
1d392a36f9
Fix extended attributes handling for VSS snapshots 2024-08-11 01:23:47 -06:00
Michael Eischer
3f5e2160de
Merge pull request #4938 from MichaelEischer/bump-go-version
Bump go version to 1.21
2024-08-10 19:57:59 +02:00
Michael Eischer
283225f15f
Merge pull request #4994 from MichaelEischer/less-flaky-watchdog-test
backend: tweak timeouts to make watchdog timeout test less flaky
2024-08-10 19:35:38 +02:00
Michael Eischer
400ae55940 replace deprecated usages of math/rand 2024-08-10 19:34:49 +02:00
Michael Eischer
0b19f6cf5a Switch back to sha256 from the std library
The std library now also supports the sha assembly instructions on
ARM64. Thus, sha256-simd no longer provides a performance benefit.
2024-08-10 19:16:10 +02:00
Michael Eischer
ad48751adb bump required go version to 1.21 2024-08-10 19:16:10 +02:00
Michael Eischer
86390b453d
Merge pull request #4980 from zmanda/unsupported-ea-handling
Skip ExtendedAttribute processing in Windows for volumes that do not support EA
2024-08-10 17:11:12 +00:00
Michael Eischer
fa35e72214 backend: tweak timeouts to make watchdog timeout test less flaky 2024-08-10 19:08:03 +02:00
Michael Eischer
05571286b2
Merge pull request #4946 from mikix/json-errors
Improve error handling in --json mode
2024-08-10 17:04:56 +00:00
aneesh-n
18e9d71d7a
Fix review comments 2024-08-10 10:38:04 -06:00
Michael Eischer
a164789321
Merge pull request #4977 from MichaelEischer/warn-on-incomplete-metadata
backup: warn but store store item if extended metadata is incomplete
2024-08-10 17:59:25 +02:00
aneesh-n
71632a8197
Handle extended length paths 2024-08-05 16:03:43 -06:00
aneesh-n
85639f5159
Add handling for relative paths, vss paths, UNC paths 2024-08-04 13:19:13 -06:00
aneesh-n
c13725b5d0
Check EA support only for volumes, files and dirs 2024-08-04 11:05:40 -06:00
aneesh-n
89712f6640
Formatted 2024-08-04 10:36:13 -06:00
aneesh-n
9dedba6dfc
Address review comments 2024-08-04 10:23:39 -06:00
aneesh-n
8c8a066c0e
Correct the bitmask for fileSupportsExtendedAttributes and add link 2024-08-03 18:06:47 -06:00
aneesh-n
56113a8da7
Skip EA processing for volumes that do not support EA 2024-08-03 16:03:30 -06:00
Michael Eischer
73c9780321 backup: store but warn if extended metadata for item is incomplete
Files were not included in the backup if the extended metadata for the
file could not be read. This is rather drastic. Instead settle on
returning a warning but still including the file in the backup.
2024-08-03 22:25:29 +02:00
Michael Terry
88f59fc2d6 json: switch backup and restore errors from string to struct types
This keeps backwards compatibility with the previous empty structs.
And maybe we'd want to put other fields into the inner struct later,
rather than the outer message.
2024-08-03 16:21:44 -04:00
Michael Eischer
a48baf6f3a
Merge pull request #4976 from textaligncenter/backup-panic
fix panic in fs_reader
2024-08-03 19:56:15 +00:00
Michael Terry
a376323331 restore: print JSON versions of errors in --json mode
Previously, they were printed as freeform text.

This also adds a ui.Terminal interface to make writing
tests easier and also adds a few tests.
2024-08-03 15:18:46 -04:00
Michael Eischer
e622135e7e
Merge pull request #4974 from MichaelEischer/fix-cache-debug-log
cache: fix confusing debug log
2024-08-03 21:12:32 +02:00
textaligncenter
d8ea178e69 fix panic in fs_reader 2024-08-03 19:08:04 +00:00
Michael Terry
ad2585af67 backup: show actual error strings in --json mode
Previously, an error JSON fragment would look like:
{"message_type": "error", "error": {}}

This is because encoding/json cannot marshal an error interface.
Instead, we now call .Error() to get the string value.
2024-08-03 15:07:52 -04:00
Michael Terry
f4bdfea1c9 backup: print scanner errors to stderr, not stdout 2024-08-03 15:07:52 -04:00
Michael Eischer
d2f7c5a9c6
Merge pull request #4978 from konidev20/fix-gh-4949-repair-index-spurious-index
rewrite: skip saving empty indexes during MasterIndex.Rewrite
2024-08-03 18:53:57 +00:00
Srigovind Nayak
068d5b95c3
rewrite: skip saving empty indexes during MasterIndex.Rewrite 2024-08-03 23:34:59 +05:30
Michael Eischer
d4db5a364e
Merge pull request #4958 from mikix/restore-errors
restore: clean up error handling when restoring metadata
2024-08-03 17:58:54 +00:00
Michael Eischer
4266dca1b6 cache: fix confusing debug log 2024-08-03 18:51:38 +02:00
Michael Eischer
d407abb50f
Merge pull request #4960 from MichaelEischer/reduce-cancelation-delays
Add more checks for canceled contexts
2024-08-03 18:23:20 +02:00
Michael Eischer
ae1cb889dd Add more checks for canceled contexts 2024-07-31 19:30:47 +02:00
Michael Terry
6a97833337 restore: clean up error handling when restoring metadata
- Fix a logic error that instead of reporting the *first*
  metadata-setting error that appears, we were instead reporting the
  *last* error (and only if the lchown call failed!).
- Don't show any errors when setting metadata for files in non-root
  mode (things like timestamps, attributes). Previously, only lchown
  errors were skipped. But other kinds of attribute errors make sense
  to skip as well. The code path happened to work correctly before
  because of the above logic error. But once that was fixed, this
  change needed to happen too.
2024-07-30 19:27:34 -04:00
Michael Eischer
a9be986782 restorer: add minimal long path handling test 2024-07-29 21:11:47 +02:00
Michael Eischer
62c4a5e9a0 fs: fix long path handling for ResetPermissions, ClearAttributes and security descriptors 2024-07-29 20:10:58 +02:00
Michael Eischer
729e009485 replace all uses of target in relation to backup 2024-07-24 19:40:53 +02:00
Michael Eischer
fa5ff0873a
Merge pull request #4925 from MichaelEischer/fix-restore-truncation
restore: Fix truncation of uptodate files
2024-07-21 12:28:12 +02:00
Michael Eischer
0dcac90bea restorer: don't track already uptodate blobs 2024-07-21 12:03:56 +02:00
Michael Eischer
10efa77103 restorer: add test for file truncation case 2024-07-21 12:03:56 +02:00
Michael Eischer
6f8e17a463 restorer: minor code cleanups 2024-07-21 12:03:56 +02:00
Michael Eischer
5d6ce59a8d restorer: also truncate files if their content is already uptodate
Files for which no blobs have to be restored, still have to be truncated
to the correct size. Take a file with content "foobar" that should be
replaced by restore with content "foo". The first three bytes are
already uptodate, such that no data has to be written. As file
truncation normally happens when writing data, a special case is
necessary.

This no blobs written special case is unified with the empty file
special case.
2024-07-21 12:03:56 +02:00
Michael Eischer
59c880fce3 restorer: only show size in text output for files 2024-07-20 12:46:28 +02:00
Alex Johnson
3bf2927006 Update snapshot summary on rewrite
Signed-off-by: Alex Johnson <hello@alex-johnson.net>
2024-07-16 12:06:50 -05:00
Michael Eischer
dcfffd7779 restore: extend overwrite test for small files 2024-07-14 11:30:41 +02:00
Michael Eischer
44e3610b32 restore: progress bar total on windows 2024-07-14 11:21:11 +02:00
Michael Eischer
98cfb2c4c8 restore: test progress reporting for partially up to date files 2024-07-14 11:21:11 +02:00
Michael Eischer
26aa65e0d4 restore: add regression test for corrupt in-place restore of large file 2024-07-14 11:21:11 +02:00
Michael Eischer
2833b2f699 restore: fix progress bar for partially up to date files 2024-07-14 11:21:11 +02:00