Commit graph

9928 commits

Author SHA1 Message Date
Thomas Waldmann
bf0efe3ea4 docs: use only link to vorta docs (address feedback on #9620) 2026-05-13 10:17:03 +02:00
Thomas Waldmann
d93f295082 docs: add FAQ entry for SSH connection timeouts (fixes #5629) 2026-05-13 10:17:02 +02:00
TW
7c8fa4e787
Merge pull request #9621 from borgbackup/backport-9614-to-master
[Backport master] docs: improve macOS Keychain instructions (fixes #5156)
2026-05-13 10:03:39 +02:00
Thomas Waldmann
4dc21d7ed1 docs: improve macOS Keychain instructions (fixes #5156)
(cherry picked from commit fb8bab1c2d)
2026-05-13 07:56:52 +00:00
TW
a554fd4e18
Merge pull request #9611 from ThomasWaldmann/prune-stats-enhancement-master
Some checks are pending
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
prune: show total vs matching archives in output, fixes #9262
2026-05-13 00:35:49 +02:00
TW
38a1f9305d
Merge pull request #9609 from borgbackup/dependabot/pip/requirements.d/pip-26.1
Some checks are pending
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
build(deps-dev): bump pip from 26.0.1 to 26.1 in /requirements.d
2026-05-12 23:26:19 +02:00
Thomas Waldmann
1cb185a8e6
prune: show total vs matching archives in output, fixes #9262 2026-05-12 23:22:09 +02:00
TW
7b60edd0c0
Merge pull request #9598 from ThomasWaldmann/slashdot-root-master
Fix slashdot hack excluding source directory metadata, fixes #9534
2026-05-12 22:43:41 +02:00
dependabot[bot]
30c8cb9fd1
build(deps-dev): bump pip from 26.0.1 to 26.1 in /requirements.d
Bumps [pip](https://github.com/pypa/pip) from 26.0.1 to 26.1.
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/26.0.1...26.1)

---
updated-dependencies:
- dependency-name: pip
  dependency-version: '26.1'
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 20:37:09 +00:00
TW
0263d1deb7
Merge pull request #9607 from ThomasWaldmann/fix-dependabot-9603
build(deps-dev): bump pip-dependencies group (fix #9603 - virtualenv for tox 4.52.1)
2026-05-12 22:35:53 +02:00
Thomas Waldmann
6d3abf73a7 build(deps-dev): bump pip-dependencies group, fix virtualenv for tox 4.52.1
Include all changes from dependabot PR #9603 plus fix the broken
virtualenv pin: tox 4.52.1 requires virtualenv>=21.1, but PR #9603
kept virtualenv==20.39.1 (20.x). Bumped virtualenv to 21.3.2.

Fixes: https://github.com/borgbackup/borg/pull/9603
2026-05-12 20:03:23 +02:00
TW
022b499be8
Merge pull request #9605 from ThomasWaldmann/platform-fixes
platform fixes
2026-05-12 19:51:12 +02:00
TW
2d39046882
Merge pull request #9606 from ThomasWaldmann/remove-checksums-module
remove the superfluous borg.checksums module
2026-05-12 19:44:26 +02:00
TW
d73c11ac77
Merge pull request #9604 from ThomasWaldmann/chunker-fixes
chunker fixes
2026-05-12 18:42:27 +02:00
Thomas Waldmann
227484b679
remove the superfluous borg.checksums module 2026-05-12 18:41:34 +02:00
Thomas Waldmann
2bb9e4889b
macOS: fix TypeError when _get_birthtime_ns gets called with an FD
Crashed when trying to os.fsdecode(path) when path is an int.
2026-05-12 18:15:00 +02:00
Thomas Waldmann
b362b0898e
buzhash chunkers: add len==0 check to avoid buffer over-read
Isn't called by the higher level code with len==0,
but adding the check nevertheless for cleaner and
less suspicious code.
2026-05-12 17:30:07 +02:00
Thomas Waldmann
f94e3dea95
chunkers: check return value of malloc, raise MemoryError 2026-05-12 17:19:22 +02:00
TW
ca3e88f5b1
Merge pull request #9600 from mr-raj12/legacy-crypto-key-phase2
Some checks are pending
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
legacy: move legacy AES-CTR key classes into borg.legacy.crypto, refs #9556
2026-05-11 16:06:57 +02:00
Mrityunjay Raj
0cf9322d78 legacy: fix mypy false positives in key classes caused by circular import, refs #9556 2026-05-11 18:13:08 +05:30
Mrityunjay Raj
e01ba500f8 legacy: move legacy AES-CTR key classes into borg.legacy.crypto, refs #9556 2026-05-11 17:40:11 +05:30
TW
bae103637d
Merge pull request #9589 from ThomasWaldmann/chunkerfixed-sparse-handling-tests-master
Some checks are pending
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
ChunkerFixed sparse handling tests (master)
2026-05-10 08:49:36 +02:00
Thomas Waldmann
8343746210
Fix slashdot hack excluding source directory metadata, fixes #9534
When using the slashdot hack (e.g. `borg create ARCHIVE rootfs/./`),
the source directory's metadata was being excluded instead of archived as
the archive root. This happened because `create_helper` treated the
slashdot target directory the same as its parent directories (which should
be stripped), rather than recognizing it as the root of the archive.

Added a new condition in `create_helper` to detect when the current path
matches the strip prefix target exactly (`path + "/" == strip_prefix`) and
archive it as `"."` (the archive root) instead of excluding it.
2026-05-09 01:43:18 +02:00
Thomas Waldmann
62d8762eb7
fixed_test: remove commented-out skipif decorator
The @pytest.mark.skipif(not fs_supports_sparse(), ...) decorator on
test_chunkify_sparse was commented out and is not needed because the
zeros.startswith(result) fix in FileReader.read() detects zero-filled
slices as CH_ALLOC regardless of sparse FS support, and ChunkerFixed
with sparse=True gracefully falls back when SEEK_HOLE/SEEK_DATA is
not available.
2026-05-09 00:47:04 +02:00
Thomas Waldmann
7b889d357d
test_sparsemap: coalesce expected sparse map to match OS behavior
The test_sparsemap tests were failing on Linux CI because SEEK_HOLE/
SEEK_DATA naturally coalesces adjacent ranges of the same type (data
or hole), but the tests compared against the raw per-block sparse maps
which list each block separately.

Add a coalesce_sparse_map() helper that merges adjacent ranges with
the same is_data flag, and compare sparsemap() output against the
coalesced expected map instead of the raw per-block map.
2026-05-09 00:32:45 +02:00
Thomas Waldmann
827b82938f
FileReader.read: detect zero-filled slices from CH_DATA blocks
When FileReader.read() sliced a large CH_DATA block (read at 1MB
granularity) into smaller block_size chunks (e.g. 4096 bytes), zero-filled
slices were returned as CH_DATA with zero bytes instead of CH_ALLOC.

Add a zeros.startswith(result) check before returning a CH_DATA chunk,
converting all-zero slices to CH_ALLOC. This ensures sparse-aware
consumers correctly identify allocated-but-zero regions regardless of
whether the file was read with sparse=True or sparse=False.
2026-05-09 00:01:46 +02:00
Thomas Waldmann
9b8cfc7d83
tests: pretty print 2026-05-09 00:01:45 +02:00
Thomas Waldmann
e9b62dc29a
maps: always use BS sized blocks
the fixed chunker also cuts BS blocks.
2026-05-09 00:01:43 +02:00
Thomas Waldmann
5a314d6f51
don't use sparse with BytesIO
doesn't work anyway.
2026-05-09 00:01:42 +02:00
Thomas Waldmann
95e12fb669
simplify fixed test 2026-05-09 00:01:40 +02:00
Thomas Waldmann
73bca86fb3
comment / use BS in test 2026-05-09 00:01:39 +02:00
Thomas Waldmann
fa376b0d9d
Fix ChunkerFixed sparse handling and update tests
- Update fixed_test.py expectations for non-sparse chunking.
- Enable `sparse=True` in interaction_test.py and reader_test.py where zero detection is required.
- Catch `ValueError` in _build_fmap to support `BytesIO` seeking.
2026-05-09 00:01:37 +02:00
TW
ef014a6b98
Merge pull request #9595 from ThomasWaldmann/fix-crypto-ll-master
crypto low_level: fix freeing of memory
2026-05-08 23:35:20 +02:00
TW
d9a8d992b4
Merge pull request #9597 from mr-raj12/fix-fdatasync-docstring
platform: fix fdatasync docstring, clarify OS-level vs HW-level flush
2026-05-08 23:34:09 +02:00
TW
614527bfbd
Merge pull request #9596 from ThomasWaldmann/fix-remoterepo-master
extract: resolve memory leak on abandoned async requests in RemoteRepository
2026-05-08 19:55:13 +02:00
TW
7e427989c7
Merge pull request #9594 from ThomasWaldmann/fix/borgfs-fstab-home-dir-3395-master
helpers: get_base_dir: avoid using HOME when it incorrectly points to root's home for non-root users (fstab borgfs), fixes #3395
2026-05-08 19:28:36 +02:00
Mrityunjay Raj
1198353d55 platform: fix fdatasync docstring, clarify OS-level vs HW-level flush 2026-05-08 22:38:31 +05:30
Thomas Waldmann
f15adc5dcf
extract: resolve memory leak on abandoned async requests in RemoteRepository
When a generator for get_many() or call_many() is destroyed early (for example, if a BackupError occurs during extraction and aborts fetching preloaded chunks), a GeneratorExit is raised inside call_many().

Previously, call_many() lacked a try/finally block, so it failed to mark the abandoned msgids in self.ignore_responses. When the remote server eventually sent the data, it was indefinitely cached in self.responses and self.chunkid_to_msgids, causing a memory leak.

This fix wraps the request loop in try/finally to guarantee that all pending waiting_for message IDs, as well as any unrequested preloaded chunk IDs in calls, are properly added to ignore_responses.

For example, this memory leak could be triggered when extracting files:
- by permission errors or other OSErrors with the extracted file
- if the archived file had all-zero replacement chunks or inconsistent size
2026-05-08 18:54:03 +02:00
Thomas Waldmann
b01f4c01af
crypto low_level: fix freeing of memory, borg2 crypto classes
The previous code performed allocations and buffer acquisitions before the
`try` block. If a later allocation or buffer acquisition failed, execution did
not enter the `finally` block, so resources acquired earlier in the setup path
could leak.

Move allocation and buffer acquisition into the guarded block, initialize raw
output pointers to `NULL`, and only call `PyMem_Free` or `PyBuffer_Release`
for resources that were actually acquired.
2026-05-08 17:08:55 +02:00
Thomas Waldmann
70b3e6ee4c
crypto low_level: fix freeing of memory
The previous code performed allocations and buffer acquisitions before the
`try` block. If a later allocation or buffer acquisition failed, execution did
not enter the `finally` block, so resources acquired earlier in the setup path
could leak.

Move allocation and buffer acquisition into the guarded block, initialize raw
output pointers to `NULL`, and only call `PyMem_Free` or `PyBuffer_Release`
for resources that were actually acquired.
2026-05-08 16:53:48 +02:00
Thomas Waldmann
a71a252036
helpers: get_base_dir: avoid using HOME when it incorrectly points to root's home for non-root users (fstab borgfs), fixes #3395
I just added the current 1.4-maint code to the legacy branch.
Maybe more changes are needed for the non-legacy branch.
2026-05-08 16:44:22 +02:00
TW
c409e767b9
Merge pull request #9550 from ThomasWaldmann/fix-test_create_read_special_symlink-master
Fix test_create_read_special_symlink (master)
2026-05-08 13:58:42 +02:00
TW
9da719e6a7
Merge pull request #9559 from mr-raj12/legacy-package-phase1-2
legacy: move LegacyRepository, LegacyRemoteRepository, RepoObj1 into borg.legacy package, refs #9556
2026-05-08 13:12:29 +02:00
TW
67061b0aeb
Merge pull request #9591 from borgbackup/backport-9590-to-master
[Backport master] mount: improve error msg when uid/gid cannot be resolved, fixes #9574
2026-05-05 01:47:12 +02:00
Thomas Waldmann
f48905b6d6
mount: improve error msg when uid/gid cannot be resolved, fixes #9574
(cherry picked from commit 0eaa76f252)
2026-05-04 23:38:55 +02:00
Thomas Waldmann
54dac7b896
test_create_read_special_symlink: remove test skip 2026-05-04 22:18:28 +02:00
TW
fe0be41c1c
Merge pull request #9584 from ThomasWaldmann/cpa10-master
remove workaround for cross-platform-actions < v1.0.0, fixes #9565
2026-05-04 20:16:33 +02:00
Thomas Waldmann
684928885b
remove workaround for cross-platform-actions < v1.0.0, fixes #9565 2026-05-04 19:23:56 +02:00
TW
450b017b2d
Merge pull request #9569 from borgbackup/dependabot/pip/requirements.d/pip-dependencies-8dbc0ac129
Some checks failed
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.8) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
build(deps-dev): bump the pip-dependencies group in /requirements.d with 2 updates
2026-04-14 15:43:30 +02:00
TW
76ecc72665
Merge pull request #9570 from borgbackup/dependabot/github_actions/actions-a93df0a446
build(deps): bump cross-platform-actions/action from 0.32.0 to 1.0.0 in the actions group
2026-04-14 15:43:10 +02:00