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
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
db459eda21
move to subcommand
2023-05-01 15:15:48 +02:00
Michael Eischer
a14a63cd29
modernize code
2023-05-01 15:12:09 +02:00
Alexander Weiss
947f0c345e
correct typos
2023-05-01 14:56:42 +02:00
Alexander Weiss
d23a2e1925
better error handling and correct nil tree behavior
2023-05-01 14:56:42 +02:00
Alexander Weiss
08ae708b3b
make linter happy
2023-05-01 14:56:42 +02:00
Alexander Weiss
99a05d5ab2
Update troubleshooting documentation
2023-05-01 14:56:42 +02:00
Alexander Weiss
6557f36f61
Add changelog and docu for #2876
2023-05-01 14:56:42 +02:00
Alexander Weiss
5f58797ba7
Add repair command
2023-05-01 14:56:42 +02:00
Alexander Weiss
9cef6b4c69
Add troubleshooting documentation
2023-05-01 14:56:42 +02:00
Michael Eischer
8d971172c4
Merge pull request #4306 from MichaelEischer/document-restic-compression-env
...
Document that the compression mode can be set via $RESTIC_COMPRESSION
2023-04-30 18:26:10 +02:00
Michael Eischer
37d0e323eb
doc: update help output in manual_rest.rst
2023-04-30 16:12:29 +02:00
Michael Eischer
face5bd7f7
Document that the compression mode can be set via $RESTIC_COMPRESSION
2023-04-30 16:11:53 +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
Michael Eischer
850cd9aace
Merge pull request #4299 from MichaelEischer/update-scripting-docs
...
doc: recommend `cat config` to check if a repository exists
2023-04-30 16:04:59 +02:00
Michael Eischer
c8641f4479
Merge branch 'patch-release'
2023-04-24 20:44:38 +02:00
Alexander Neumann
ac7ac0cb97
Set development version for 0.15.2
2023-04-24 20:28:37 +02:00
Alexander Neumann
be8be3397c
Add version for 0.15.2
2023-04-24 20:28:37 +02:00
Alexander Neumann
db6b4f8912
Update manpages and auto-completion
2023-04-24 20:28:37 +02:00
Alexander Neumann
1f3f042f32
Generate CHANGELOG.md for 0.15.2
2023-04-24 20:28:24 +02:00
Alexander Neumann
0aaa4e6cbe
Prepare changelog for 0.15.2
2023-04-24 20:28:24 +02:00
Leo R. Lundgren
0bac935dac
doc: Polish changelogs
2023-04-23 22:10:04 +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
1e6e9f9bd0
tweak changelogs
2023-04-23 12:46:55 +02:00
greatroar
f342db7666
ui/termstatus: Quote funny filenames
...
Fixes #2260 , #4191 .
2023-04-23 12:45:40 +02:00
Michael Eischer
41cc320145
Merge pull request #4166 from MichaelEischer/cache-mkdirall
...
cache: Create missing intermediate directories when caching a file
2023-04-23 11:44:18 +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
22562d2132
Merge pull request #4300 from MichaelEischer/less-flaky-tests
...
Increase timeouts for lock refresh tests
2023-04-23 11:24:59 +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
179e11c2ae
Increase timeouts for lock refresh tests
...
When saving files to the local backend, in some cases the used fsync
calls are slow enough to cause the tests to time out. Thus, increase the
test timeouts as a stopgap measure until we can use the mem backend for
these tests.
2023-04-22 12:45:59 +02:00
Michael Eischer
ebba233a3a
backend/sema: rename constructor to NewBackend
2023-04-22 12:32:57 +02:00