1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 13:45:31 +00:00
Commit graph

8619 commits

Author SHA1 Message Date
Thomas Waldmann
85688e7543
keep timestamp only in security dir
removed some code borg had for backwards compatibility with
old borg versions (that had timestamp only in the cache).

now the manifest timestamp is only checked against the manifest-timestamp
file in the security dir, simplifying the code.
2024-07-15 12:45:09 +02:00
Thomas Waldmann
89d867ea30
keep key_type only in security dir
removed some code borg had for backwards compatibility with
old borg versions (that had key_type only in the cache).

now the repo key_type is only checked against the key-type
file in the security dir, simplifying the code.
2024-07-15 12:45:08 +02:00
Thomas Waldmann
cf8c3a3ae7
keep previous repo location only in security dir
removed some code borg had for backwards compatibility with
old borg versions (that had previous_location only in the
cache).

now the repo location is only checked against the location
file in the security dir, simplifying the code and also
fixing a related test failure with NewCache.

also improved test_repository_move to test for aborting in
case the repo location changed unexpectedly.
2024-07-15 12:45:06 +02:00
Thomas Waldmann
fbfa7cf7bf
fix test_recreate_rechunkify
We can not use unique_chunks counter with NewCache,
thus we use a simpler (and weaker) assertion.
2024-07-15 12:45:05 +02:00
Thomas Waldmann
e3a0c4f375
fix check_cache and test_check_cache
NewCache and AdHocCache do not have a persistent chunks index,
so both check_cache and test_check_cache are pointless.
2024-07-15 12:45:03 +02:00
Thomas Waldmann
ab6049e269
fix test_list_chunk_counts
NewCache does not do precise refcounting, thus it does not know about
unique chunks.

For now, let's just test num_chunks, but not unique_chunks.
2024-07-15 12:45:01 +02:00
Thomas Waldmann
c73f6d4ff3
fix test_delete
NewCache does not do precise refcounting, thus chunks won't be deleted
from the repo at "borg delete" time.

"borg check --repair" would remove such chunks IF they are orphans.
2024-07-15 12:45:00 +02:00
Thomas Waldmann
86adc04da4
fix test_debug_refcount_obj for misc. refcounts 2024-07-15 12:44:59 +02:00
Thomas Waldmann
5136fa8fe3
fix test part that only works with LocalCache 2024-07-15 12:44:57 +02:00
Thomas Waldmann
25a7a1443a
skip tests requiring the chunks index (archive)
Only LocalCache implements these.
2024-07-15 12:44:55 +02:00
Thomas Waldmann
4cd9bc8a6b
check: do not consider orphan chunks a problem
if we use AdHocCache or NewCache, we do not have precise refcounting.
thus, we do not delete repo objects as their refcount does not go to zero.

check --repair will just remove the orphans.
2024-07-15 12:44:53 +02:00
Thomas Waldmann
e2a1999c59
implement NewCache
Also:
- move common code to ChunksMixin
- always use ._txn_active (not .txn_active)

Some tests are still failing.
2024-07-15 12:44:52 +02:00
Thomas Waldmann
cb8d6f8e4a
AdHocCache has no cache persistence
thus:

- no cache.path
- skip on-disk cache corruption tests for AdHocCache
2024-07-15 12:44:50 +02:00
Thomas Waldmann
876c08f654
tolerate missing chunks with delete --force
if a chunk is missing in repo, it will also be missing in a ad-hoc
built chunks index.
2024-07-15 12:44:49 +02:00
Thomas Waldmann
d466005682
refactor files cache code into FilesCacheMixin class 2024-07-15 12:44:47 +02:00
Thomas Waldmann
98162fbb42
create --no-cache-sync-forced option
when given, force using the AdHocCache.
2024-07-15 12:44:44 +02:00
Thomas Waldmann
de342581d6
fix AdHocCache.add_chunk signature (ctype, clevel kwargs) 2024-07-15 12:44:43 +02:00
Thomas Waldmann
17fce18b44
always give id and size to chunk_incref/chunk_decref
incref: returns (id, size), so it needs the size if it can't
get it from the chunks index. also needed for updating stats.

decref: caller does not always have the chunk size (e.g. for
metadata chunks),
as we consider 0 to be an invalid size, we call with size == 1
in that case. thus, stats might be slightly off.
2024-07-15 12:44:41 +02:00
Thomas Waldmann
4488c077a7
files cache: add chunk size information
the files cache used to have only the chunk ids,
so it had to rely on the chunks index having the
size information - which is problematic with e.g.
the AdhocCache (has size==0 for all not new chunks) and blocked using the files cache there.
2024-07-15 12:44:34 +02:00
TW
dc25205287
Merge pull request #8284 from ThomasWaldmann/fix-8256
fix error handling (master)
2024-07-15 12:43:24 +02:00
Thomas Waldmann
126a346296
delete: fix error handling with Ctrl-C 2024-07-15 00:49:39 +02:00
Thomas Waldmann
0ae65a08c4
rcompress: fix error handling with Ctrl-C 2024-07-15 00:48:22 +02:00
Thomas Waldmann
10b38789d6
delete: fix error handling when no archive is specified, fixes #8256 2024-07-15 00:38:24 +02:00
TW
246727f12d
Merge pull request #8281 from Aztorius/no-cache-option
Add BORG_USE_CHUNKS_ARCHIVE env var, fixes #8280
2024-07-13 22:34:20 +02:00
William Bonnaventure
de5d130dda Update docs for BORG_USE_CHUNKS_ARCHIVE 2024-07-13 21:26:18 +02:00
William Bonnaventure
fb7a8f2d85 Add BORG_USE_CHUNKS_ARCHIVE option 2024-07-13 21:26:13 +02:00
TW
f5c9e2509f
Merge pull request #8276 from ThomasWaldmann/ci-windows-fix-master
github CI: windows msys2 build: broken, disable it for now, see #8264
2024-07-07 15:40:47 +02:00
Thomas Waldmann
1e38525853
github CI: windows msys2 build: broken, disable it for now, see #8264 2024-07-07 14:36:54 +02:00
TW
24afee29c2
Merge pull request #8272 from wzyboy/fix/typo
docs: fix typo
2024-07-06 20:37:56 +02:00
William Bonnaventure
c3fb27f463
Automatic rebuild cache on exception, fixes #5213 (#8257)
Try to rebuild cache if an exception is raised, fixes #5213

For now, we catch FileNotFoundError and FileIntegrityError.

Write cache config without manifest to prevent override of manifest_id.
This is needed in order to have an empty manifest_id.
This empty id triggers the re-syncing of the chunks cache by calling sync() inside LocalCache.__init__()

Adapt and extend test_cache_chunks to new behaviour:

- a cache wipe is expected now.
- borg detects the corrupt cache and wipes/rebuilds the cache.
- check if the in-memory and on-disk cache is as expected (a rebuilt chunks cache).
2024-07-06 18:05:01 +02:00
Zhuoyun Wei
7c2fdf2d1d
docs: fix typo 2024-07-05 10:46:39 -07:00
TW
aada9859ff
Merge pull request #8248 from dertuxmalwieder/patch-1
Fixed openSUSE dependencies in installation.rst
2024-06-07 17:37:40 +02:00
Cthulhux
a0f23f97e1
Update installation.rst
Moved..
2024-06-07 03:40:17 +02:00
Cthulhux
de21d79e3d
Fixed openSUSE dependencies in installation.rst
Tested with today's Tumbleweed
2024-06-06 22:32:41 +02:00
TW
1f7cc48320
Merge pull request #8244 from tree-wall/patch-1
Installation: update Arch Linux repo name
2024-06-03 12:19:15 +02:00
tree-wall
7bc6f90dd3
Installation: update Arch Linux repo name
The "community" repository was merged into the "extra" repo last year.

https://archlinux.org/news/git-migration-completed/
2024-06-02 19:21:48 +01:00
TW
f7c18cd2c8
Merge pull request #8240 from ThomasWaldmann/fix-pytest-master
fix pytest_report_header, fixes #8232
2024-05-31 16:40:20 +02:00
Thomas Waldmann
00962f9d5d
fix pytest_report_header, fixes #8232 2024-05-31 14:30:19 +02:00
TW
819e294c3f
Merge pull request #8237 from ThomasWaldmann/remove-experimental-master
recreate: remove experimental status
2024-05-29 17:22:08 +02:00
Thomas Waldmann
9fbc4bc4e7
recreate: remove experimental status
We have this since quite a while and there were no major complaints.
2024-05-29 16:42:58 +02:00
TW
e3f565623d
Merge pull request #8228 from ThomasWaldmann/allow-msgpack110-master
allow msgpack 1.1.0
2024-05-20 22:43:22 +02:00
Thomas Waldmann
d43892d474
allow msgpack 1.1.0
tests with 1.1.0rc1 were successful, thus I assume 1.1.0 will also work ok.
2024-05-20 19:56:38 +02:00
TW
1525c72549
Merge pull request #8215 from ThomasWaldmann/fix-cythonize-import-error-reporting-master
setup.py: fix import error reporting for cythonize import, see #8208 (master)
2024-05-12 18:40:52 +02:00
Thomas Waldmann
ce2a824ec9
cosmetic: blacken setup.py 2024-05-12 16:13:31 +02:00
Thomas Waldmann
8a73344352
setup.py: detect noexec build fs issue, see #8208
That "failed to map segment from shared object" error msg is not
very helpful. Add a hint that the filesystem needs to be +exec
(== not noexec mounted, like it might be the case for /tmp on
some systems).
2024-05-12 16:13:28 +02:00
Thomas Waldmann
b067f0fba2
setup.py: fix import error reporting for cythonize import, see #8208
Looks like borg's setup.py has hidden the real cause of a cythonize ImportError.

There are basically 2 cases:
- either there is no Cython installed, then the import fails because the module can not be found, or
- there is some issue within Cython and the import fails due to that.

It's important not to hide the real cause, especially if we run into case 2.

case 1 is kind of expected and frequent, case 2 is rare.
2024-05-12 16:13:26 +02:00
TW
5e36ba789a
Merge pull request #8214 from ThomasWaldmann/fix-ci-macos-openssl-master
github CI: fix PKG_CONFIG_PATH for openssl 3.0
2024-05-12 16:12:19 +02:00
Thomas Waldmann
7baf8beed6
github CI: fix PKG_CONFIG_PATH for openssl 3.0 2024-05-12 15:25:27 +02:00
Vladimir Malinovskii
0c1df415d7
changed insufficiently reserved length for log message (#8152)
changed log message reserved length
2024-04-06 20:24:10 +02:00
TW
411c763fb8
Merge pull request #8182 from ThomasWaldmann/fix-test-ht-master
format_timedelta: use 3 decimal digits (ms)
2024-04-04 13:31:58 +02:00