Michael Eischer
0058745881
test: use parameter instead of hardcoded constant
2023-05-18 21:17:53 +02:00
Michael Eischer
a719d10e22
termstatus: remove unused parameter from helpers
2023-05-18 21:17:53 +02:00
Michael Eischer
b0a01ae68a
ui/backup: remove unused parameter from ProgressPrinter interface
2023-05-18 21:17:53 +02:00
Michael Eischer
472bf5184f
Replace lots of unused parameters with _
...
The parameters are required by the implemented function signature or interface.
2023-05-18 21:17:53 +02:00
Michael Eischer
d1a5ec7839
Rename unused testing parameter to _
...
The parameter is an additional marker that the test helper must only be
used for tests.
2023-05-18 21:17:53 +02:00
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
3252f60df5
Ignore deprecated imports for poly1305 and openpgp
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
6ed73ed408
CI: remove deprecated linters
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
bfc9c6c971
Merge pull request #4331 from MichaelEischer/fix-mount-failures
...
Hopefully fix `TestMount` failures
2023-05-18 20:22:57 +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
49be202cb0
Merge pull request #4315 from MichaelEischer/restore-hardlink-progress
...
restore: Correctly account for hardlinks in progress bar
2023-05-13 21:37:40 +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
78e5aa6d30
repair snapshots: add basic tests
2023-05-04 23:00:46 +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
e71367e6b9
repair snapshots: update changelog
2023-05-01 16:06:17 +02:00
Michael Eischer
5aa37acdaa
repair snapshots: cleanup command help
2023-05-01 16:06:17 +02:00
Michael Eischer
9c64a95df8
doc: rewrite troubleshooting section
2023-05-01 16:06:17 +02:00
Michael Eischer
7c8dd61e8c
repair snapshots: cleanup warnings
2023-05-01 15:22:30 +02:00
Michael Eischer
f6cc10578d
repair snapshots: Always sanitize file nodes
...
If the node for a file is intact, this is a no-op.
2023-05-01 15:22:18 +02:00
Michael Eischer
4ce87a7f64
repair snapshots: port to filterAndReplaceSnapshot
...
The previous approach of rewriting all snapshots first, then flushing
the repository data and finally removing old snapshots has the downside
that an interrupted command execution leaves behind broken snapshots as
not all new data is already flushed.
2023-05-01 15:22:03 +02:00
Michael Eischer
e17ee40a31
repair snapshots: Port to use walker.TreeRewriter
2023-05-01 15:20:36 +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
8c4caf09a8
repair snapshots: Do not rename repaired files
...
The files in a tree must be sorted in lexical order. However, this
cannot be guaranteed when appending a filename suffix. For two files
file, file.rep
where "file" is broken, this would result in
file.repaired, file.rep
which is no longer sorted.
In addition, adding a filename suffix is also prone to filename
collisions which would require a rather complex search for a
collision-free name in order to work reliably.
2023-05-01 15:19:36 +02:00
Michael Eischer
375189488c
rewrite: prepare for code sharing with rewrite snapshots
2023-05-01 15:19:24 +02:00
Michael Eischer
903651c719
repair snapshots: partially synchronize code with rewrite command
...
Simplify CLI options:
* Rename "DeleteSnapshots" to "Forget"
* Replace "AddTag" and "Append" with hardcoded values
Change output and snapshot modifications to be more in line with the
"rewrite" command.
2023-05-01 15:19:11 +02:00