Michael Eischer
b82ecc6425
crypto: cleanup ciphertext verification error
2024-06-05 22:33:20 +02:00
Leo R. Lundgren
b2bbbe805f
azure: Improve error message in azure.Create()
2024-06-03 23:37:17 +02:00
Michael Eischer
660679c2f6
Merge pull request #4835 from MichaelEischer/fix-list-cancel
...
backend/retry: do not log final error if context was canceled
2024-06-01 19:17:30 +02:00
Michael Eischer
38654a3bd7
backend/retry: do not log final error if context was canceled
...
Calls to `List(ctx, ...)` are usually stopped by canceling the context
once no further entries are required by the caller. Thus, don't log the
final error if the used context was canceled.
2024-05-30 18:48:52 +02:00
Michael Eischer
2280fbfd2e
Merge pull request #4810 from konidev20/fix-gh-4768-add-custom-user-agent-for-http-client
...
Allow custom User-Agent to be specified for outgoing requests
2024-05-30 16:34:52 +00:00
Srigovind Nayak
de7b418bbe
http: allow custom User-Agent
for outgoing HTTP requests
2024-05-30 15:38:06 +02:00
Michael Eischer
6869bdaaa8
backup: implement --skip-if-unchanged
2024-05-30 15:14:31 +02:00
Michael Eischer
7b4f81d964
Merge pull request #4829 from greatroar/termstatus
...
termstatus: Do formatting in Message, not Terminal
2024-05-30 11:57:44 +00:00
Michael Eischer
52b3fee42b
Merge pull request #4818 from MichaelEischer/move-code
...
Move cache / index / hashing / pack packages
2024-05-30 13:54:31 +02:00
greatroar
46f04bc5f0
termstatus: Do formatting in Message, not Terminal
2024-05-27 19:05:39 +02:00
Michael Eischer
1c6067d93d
bloblru: variable name cleanup
2024-05-26 12:42:46 +02:00
Michael Eischer
21ce03cff2
bloblru: move defer outside critical section
2024-05-26 12:38:20 +02:00
Michael Eischer
0ad0b7ca7c
bloblru: fix race condition that can compute value multiple times
2024-05-26 12:37:24 +02:00
Michael Eischer
7ea508e7b8
Merge pull request #4815 from greatroar/termstatus
...
Termstatus refactoring
2024-05-25 12:08:53 +00:00
Michael Eischer
496e57f956
hashing: move to repository package
2024-05-25 13:13:03 +02:00
Michael Eischer
5e0ea8fcfa
pack: move to repository package
2024-05-25 13:13:03 +02:00
Michael Eischer
50ec408302
index: move to repository package
2024-05-25 13:13:03 +02:00
Michael Eischer
8e5d7d719c
cache: move to backend package
2024-05-24 23:04:06 +02:00
Michael Eischer
3c7b7efdc9
repository: remove prune plan parts once they are no longer necessary
2024-05-24 22:18:14 +02:00
Michael Eischer
462b82a060
index: reduce size of compressed indexes
...
use the same index size for compressed and uncompressed indexes.
Otherwise, decoding the index of a compressed repository requires
significantly more memory.
2024-05-24 22:18:14 +02:00
Michael Eischer
77873f5a9d
repository: let prune control data structure of usedBlobs set
2024-05-24 22:18:14 +02:00
Michael Eischer
2033c02b09
index: replace CountedBlobSet with AssociatedSet
2024-05-24 22:18:14 +02:00
Michael Eischer
93098e9265
prune: hide implementation details of counted blob set
2024-05-24 21:42:56 +02:00
Michael Eischer
860b595a8b
backend: increase watchdog test timeout for deflaking
2024-05-24 21:33:17 +02:00
Michael Eischer
027cc64737
repository: fix prune heuristic to allow resuming interrupted runs
...
Pack files created by interrupted prune runs, appear to consist only of
duplicate blobs on the next run. This caused the previous heuristic to
ignore those pack files. Now, a duplicate blob in a specific pack file
is also selected if that pack file only contains duplicate blobs. This
allows prune to select the already rewritten pack files.
2024-05-24 21:33:17 +02:00
Michael Eischer
e52033a8bd
index: slightly reduce Rewrite concurrency
...
The index operations are likely CPU-bounded. Thus, reduce the
concurrency accordingly.
2024-05-24 21:33:17 +02:00
Michael Eischer
57d69aa640
index: cleanup SaveIndex method
2024-05-24 21:33:17 +02:00
Michael Eischer
2ca1c37721
index: additional tests for new index save methods
2024-05-24 21:33:17 +02:00
Michael Eischer
5f7b48e65f
index: replace Save() method with Rewrite and SaveFallback
...
Rewrite implements a streaming rewrite of the index that excludes the
given packs. For this it loads all index files from the repository and
only modifies those that require changes. This will reduce the index
churn when running prune. Rewrite does not require the in-memory index
and thus can drop it to significantly reduce the memory usage.
However, `prune --unsafe-recovery` cannot use this strategy and requires
a separate method to save the whole in-memory index. This is now handled
using SaveFallback.
2024-05-24 21:33:17 +02:00
Michael Eischer
ad98fbf7dd
restic: add IDSet.Clone() method
2024-05-24 21:33:17 +02:00
Michael Eischer
72482ce5bd
index: misc cleanups
2024-05-24 21:33:17 +02:00
Michael Eischer
68fa0e0305
prune: no longer disable automatic index updates
...
this allows prune to resume an interrupted prune run.
2024-05-24 21:33:17 +02:00
Michael Eischer
9aa0c90fb2
index: remove supersedes field
...
Using the field with its current semantics is nearly impossible to get
right. Remove it as it will be replaced anyways in repository format 3.
2024-05-24 21:33:17 +02:00
Michael Eischer
76e6719f2e
repository: make CreateIndexFromPacks method private
2024-05-24 21:33:17 +02:00
Michael Eischer
04ad9f0c0c
repository: remove Packer and SavePacker from public interface
2024-05-24 21:33:17 +02:00
Michael Eischer
550d1eeac3
repository: remove SaveIndex from interface
...
The method is now only indirectly accessible via Prune or RepairIndex.
2024-05-24 21:33:17 +02:00
Michael Eischer
fb59e00614
index: rewrite MasterIndex load/save test to be independent of repository
2024-05-24 21:33:17 +02:00
Michael Eischer
447b486c20
index: deduplicate index loading of check and repository
2024-05-24 21:33:17 +02:00
Michael Eischer
6ca12c1b4a
archiver: replace most uses of restic.Repository
2024-05-24 21:33:17 +02:00
Michael Eischer
864995271e
repository: unwrap BlobHandle parameters of LookupBlob
...
The method now uses the same parameters as LookupBlobSize.
2024-05-24 21:33:17 +02:00
Michael Eischer
1266a4932f
repository: fix parameter order of LookupBlobSize
...
All methods should use blobType followed by ID.
2024-05-24 21:33:17 +02:00
Michael Eischer
e848ad651a
restic: name parameters in restic interface
2024-05-24 21:33:17 +02:00
Michael Eischer
0bb0720348
test cleanups
2024-05-24 21:33:17 +02:00
Michael Eischer
c01bcb1001
archiver: remove unused masterIndex from test
2024-05-24 21:33:17 +02:00
Michael Eischer
0aa5c53842
repository: replace HasBlob with LookupBlobSize
2024-05-24 21:33:17 +02:00
Michael Eischer
8f1e70cd9b
repository: remove clearIndex and packSize from public interface
2024-05-24 21:33:17 +02:00
Michael Eischer
4df887406f
repository: inline MasterIndex interface into Repository interface
2024-05-24 21:33:17 +02:00
Michael Eischer
3cc6827f09
forget: add feature flag for safe --keep-tags behavior
2024-05-24 20:45:33 +02:00
Michael Eischer
57f9739573
forget: Add --unsafe-allow-remove-all option
...
To prevent accidentally wiping all snapshots from a repository, that
option can only be used if either a snapshot filter or a keep policy is
specified.
Essentially, the option allows `forget --tag something
--unsafe-allow-remove-all` calls to remove all snapshots with a specific
tag.
2024-05-24 20:45:33 +02:00
Michael Eischer
c0e1f36830
forget: refuse deleting the last snapshot in a snapshot group
...
`--keep-tag invalid-tag` was previously able to wipe all snapshots in a
repository. As a user specified a `--keep-*` option this is likely
unintentional. This forbid deleting all snapshot if a `--keep-*` option
was specified to prevent data loss. (Not specifying such an option
currently also causes the command to abort)
2024-05-24 20:45:33 +02:00