Michael Eischer
1514593f22
Remove unused context or testing parameters
2023-05-18 21:17:53 +02:00
Michael Eischer
5e4e268bdc
Use _ as parameter name for unused Context
...
The context is required by the implemented interface.
2023-05-18 21:15:45 +02:00
Michael Eischer
2fa8b96843
Don't shadow builtins
2023-05-18 21:15:45 +02:00
Michael Eischer
7a01bd3b67
Remove unnecessary else block
2023-05-18 21:15:45 +02:00
Michael Eischer
319087c056
Remove redundant if ...; err != nil; return pattern
2023-05-18 21:15:45 +02:00
Michael Eischer
c832a492ac
fuse: use syscall errnos directly to fix deprecations
2023-05-18 21:15:45 +02:00
Michael Eischer
e01baeabba
Use either test or rtest to refer to internal test helpers
...
A single test file should not use both names.
2023-05-18 21:15:45 +02:00
Michael Eischer
5773b86d02
repository: Push all usage of errors.Fatal out of the package
...
As the `Fatal` error type only includes a string, it becomes impossible
to inspect the contained error. This is for a example a problem for the
fuse implementation, which must be able to detect context.Canceled
errors.
Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com>
2023-05-18 17:27:41 +02:00
Michael Eischer
a013014c24
backup: return normal error if --group-by cannot be parsed
...
Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com>
2023-05-18 17:23:31 +02:00
Michael Eischer
f9850b79b5
rest/sftp: Remove redundant fatal from error message
...
This caused restic to exit with error messages like
`Fatal: parsing repository location failed: Fatal: sftp path [...]`
`Fatal: create repository at rest:http://localhost:12345/ failed: Fatal: config file already exists`
2023-05-18 17:22:26 +02:00
Michael Eischer
2f518b7241
Merge pull request #4304 from MichaelEischer/unlimited-lock-refresh
...
lock: Do not limit backend concurrency for lock files
2023-05-13 21:40:29 +02:00
Michael Eischer
19ebc1b786
restore: Add basic test for progress bar accounting of hardlinks
2023-05-08 20:51:49 +02:00
Michael Eischer
23a122a901
restore: count files in the same way as the stats command
2023-05-08 20:51:49 +02:00
Michael Eischer
e77002f841
restore: correctly count hardlinks in progress bar
...
For hardlinked files, only the first instance of that file increases the
amount of bytes to restore. All later instances only increase the file
count but not the restore size.
2023-05-08 20:51:49 +02:00
Michael Eischer
d05f6211d1
lock: Do not limit backend concurrency for lock files
...
restic must be able to refresh lock files in time. However, large
uploads over slow connections can cause the lock refresh to be stuck
behind the large uploads and thus time out.
2023-05-08 19:04:46 +02:00
Michael Eischer
ee3c55ea3d
Merge pull request #2876 from aawsome/new-repair-command
...
Add repair command
2023-05-05 23:22:24 +02:00
Michael Eischer
db046c0acc
Merge pull request #4318 from MichaelEischer/status-output-truncation
...
Fix status output truncation
2023-05-05 23:09:59 +02:00
Michael Eischer
3e6a26e2e9
Merge pull request #4317 from MichaelEischer/debug-test-mount-failures
...
mount: enable debug logging for the flaky TestMount test
2023-05-05 23:08:03 +02:00
greatroar
65c5e511a1
ui/termstatus: Add test for Terminal.SetStatus
2023-05-05 22:51:41 +02:00
Michael Eischer
6d10c655a0
termstatus: test status line sanitization
2023-05-05 22:51:41 +02:00
Michael Eischer
bb40e49e75
ui/termstatus: Fix truncation of status output
...
The last line was not truncated as expected
2023-05-05 22:45:52 +02:00
Michael Eischer
fefe15d7a1
Merge pull request #4316 from MichaelEischer/fix-check-modified-data
...
Fix flaky TestCheckerModifiedData test
2023-05-05 22:38:28 +02:00
Michael Eischer
1cb11ad8ad
mount: enable debug logging for the flaky TestMount test
...
The test case fails from time to time with an Input/Output error while
trying to access the snapshots directory.
2023-05-01 18:03:17 +02:00
Michael Eischer
90a663c94f
Merge pull request #4308 from greatroar/tar-header
...
dump: Report filename with tar.ErrFieldTooLong
2023-05-01 17:30:31 +02:00
Michael Eischer
88a7231217
report snapshot id if loading failed
2023-05-01 17:24:13 +02:00
Michael Eischer
c0627dc80d
check: Fix flaky TestCheckerModifiedData
...
The test had a 4% chance of not modified the data read from the
repository, in which case the test would fail. Change the data
manipulation to just modified each read operation.
2023-05-01 17:18:19 +02:00
Michael Eischer
1bd1f3008d
walker: extend TreeRewriter to support snapshot repairing
...
This adds support for caching already rewritten trees, handling of load
errors and disabling the check that the serialization doesn't lead to
data loss.
2023-05-01 15:20:24 +02:00
Michael Eischer
38dac78180
walker: restructure FilterTree into TreeRewriter
...
The more generic RewriteNode callback replaces the SelectByName and
PrintExclude functions. The main part of this change is a preparation to
allow using the TreeRewriter for the `repair snapshots` command.
2023-05-01 15:20:12 +02:00
Michael Eischer
bc2399fbd9
walker: recurse into directory based on node type
...
A broken directory might also not have a subtree.
2023-05-01 15:20:00 +02:00
Michael Eischer
1a9705fc95
walker: Simplify change detection in FilterTree
...
Now the rewritten tree is always serialized which makes sure that we
don't accidentally miss any relevant changes.
2023-05-01 15:19:48 +02:00
Michael Eischer
118d599d0a
Rename 'rebuild-index' to 'repair index'
...
The old name still works, but is deprecated.
2023-05-01 15:16:44 +02:00
Michael Eischer
1daf928a77
Merge pull request #4305 from MichaelEischer/stracktrace-for-windows
...
Print stacktrace in SIGINT handler if RESTIC_DEBUG_STACKTRACE_SIGINT set
2023-04-30 16:08:58 +02:00
Michael Eischer
37bab08181
Merge pull request #4302 from MichaelEischer/logging-cleanup
...
Tweak debug logs
2023-04-30 16:08:08 +02:00
Michael Eischer
6dc2324d2e
Merge pull request #4301 from MichaelEischer/less-restore-memory
...
restore: slightly reduce memory usage while restoring files
2023-04-30 16:07:43 +02:00
greatroar
b50ff04cf3
dump: Report filename with tar.ErrFieldTooLong
...
Updates #4307 .
2023-04-27 11:45:41 +02:00
Michael Eischer
306a29980a
Print stacktrace in SIGINT handler if RESTIC_DEBUG_STACKTRACE_SIGINT set
...
The builtin mechanism to capture a stacktrace in Go is to send a SIGQUIT
to the running process. However, this mechanism is not avaiable on
Windows. Thus, tweak the SIGINT handler to dump a stacktrace if the
environment variable `RESTIC_DEBUG_STACKTRACE_SIGINT` is set.
2023-04-23 15:50:40 +02:00
Michael Eischer
cdb0fb9c06
tweak debug logs
2023-04-23 11:38:06 +02:00
Michael Eischer
94cbc6392d
restore: slightly reduce memory usage while restoring files
...
The information which target files are contained in a pack file is no
longer necessary after processing a pack.
2023-04-23 11:33:21 +02:00
Michael Eischer
78a1757e5a
Cancel current command if cache becomes unusable
...
If the cache suddenly disappears, the current command will now fail.
2023-04-23 11:31:15 +02:00
Michael Eischer
51d823348d
Merge pull request #4286 from MichaelEischer/backend-cleanup-logging
...
Normalize backend logging and connection limiting
2023-04-23 11:24:26 +02:00
Michael Eischer
831f593b87
backend/sema: Add tests
2023-04-22 13:20:20 +02:00
Michael Eischer
ebba233a3a
backend/sema: rename constructor to NewBackend
2023-04-22 12:32:57 +02:00
Michael Eischer
f27750e270
backend/sema: rename type to connectionLimitedBackend
2023-04-21 22:53:09 +02:00
Michael Eischer
1dd873b706
Merge pull request #4293 from MichaelEischer/fix-groups-by
...
Fix parent snapshot selection for relative paths
2023-04-21 22:47:03 +02:00
Michael Eischer
913eab3361
Merge pull request #4234 from thndrbrrr/forget-opts-neg1-means-forever-issue-2565
...
restic forget --keep-* options will interpret -1 as "forever"
2023-04-14 23:18:47 +02:00
Michael Eischer
a06d927dce
Merge pull request #4291 from greatroar/widechars
...
ui/termstatus: Optimize Truncate
2023-04-14 22:48:34 +02:00
Michael Eischer
fd3ed9e2f4
Merge pull request #4192 from greatroar/quote
...
ui/termstatus: Quote funny filenames
2023-04-14 22:39:09 +02:00
Michael Eischer
6042df075f
migrations: Fix S3 backend detection
2023-04-14 22:32:16 +02:00
Michael Eischer
c934c99d41
gs: replace usage of context.Background()
2023-04-14 22:32:15 +02:00
Michael Eischer
616926d2c1
gs: use IsNotExist to check error
2023-04-14 22:32:15 +02:00