Commit graph

1998 commits

Author SHA1 Message Date
TW
fc8c8e0fe9
Merge pull request #9811 from ThomasWaldmann/env-hostname-username-master
Replace create --hostname/--username with BORG_HOSTNAME/BORG_USERNAME env vars, fixes #9651
2026-07-05 14:56:52 +02:00
TW
f829eef49a
Merge pull request #9848 from mr-raj12/docs-pack-files-figures
docs: illustrate pack file format and sync packs.rst to multi-object packs
2026-07-03 14:03:35 +02:00
Mrityunjay Raj
55535a21eb docs: address review, add excalidraw sources for pack figures
Fix outdated wording in pack figures and captions, document the
diagram workflow in development.rst, and check in editable sources.
2026-07-03 17:22:36 +05:30
Thomas Waldmann
b220fba833
update CHANGES 2026-07-03 09:43:41 +02:00
Mrityunjay Raj
8a24775180 docs: illustrate pack file format and sync packs.rst to multi-object packs, refs #8572 2026-07-03 10:40:36 +05:30
Thomas Waldmann
f2b96e3d15
fastcdc: add FastCDC chunker with a keyed Gear hash
Add a new "fastcdc" content-defined chunker selectable via --chunker-params.
It uses the FastCDC Gear rolling hash (fp = (fp << 1) + Gear[byte]), which is
window-less and cheaper per byte than buzhash's cyclic-polynomial update, so it
chunks noticeably faster (see "borg benchmark cpu" output), while producing
the same chunk-size distribution and deduplication.

The Gear table is keyed: it is derived from the repo id key via CSPRNG (own
"fastcdc" domain), exactly like the buzhash64 table, so chunk cut points stay
unpredictable without the key (anti-fingerprinting). It implements the same
FastCDC techniques as buzhash64 (sub-minimum skipping, normalized chunking with
a required nc_level, min/max clamping); the mask uses the high bits of the hash
(Gear accumulates entropy there).

chunker-params: "fastcdc,chunk_min,chunk_max,chunk_mask,nc_level" - there is no
window field, because Gear is window-less. e.g. fastcdc,19,23,21,2

Also: borg benchmark cpu now measures the fastcdc chunker; tests in
borg.testsuite.chunkers (golden vector, size distribution, keyed gear table,
param parsing, slow fuzz); docs and changelog.

Benchmarks (scripts/chunker_bench.py, buzhash64 vs fastcdc, both nc_level=2,
incompressible data unless noted):

  5 GiB, 2 MiB target (default params):
    buzhash64: CV 0.294, 1011 MB/s
    fastcdc:   CV 0.295, 1313 MB/s   (+30%)

  64 MiB, 64 KiB target:
    buzhash64: CV 0.374, shift-resilience 0.9928,  963 MB/s
    fastcdc:   CV 0.359, shift-resilience 0.9929, 1331 MB/s   (+38%)

  Re-backup of a 2.5 GiB file after scattered single-byte edits (dedup ratio,
  0.5 = v2 fully deduplicated, lower is better):
     64 edits:  buzhash64 0.5237, fastcdc 0.5236
    320 edits:  buzhash64 0.6133, fastcdc 0.6161

  borg benchmark cpu, 1 GB: fastcdc 3.80s, buzhash 4.36s, buzhash64 8.13s,
  fixed 0.56s.

Chunk-size distribution, deduplication and shift-resilience match buzhash64
within noise; fastcdc is consistently faster.

Also: fix bug when computing the mask, one needs to use 1ULL instead of
1, so the shifting computation is done in a uint64, not in a 32bit int.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 23:24:25 +02:00
Thomas Waldmann
294105586b docs: drop redundant sphinxcontrib.jquery setup_extension call
sphinxcontrib.jquery is already registered in the extensions list, so
the explicit app.setup_extension("sphinxcontrib.jquery") in setup() is
redundant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:46:33 +02:00
Thomas Waldmann
0e3876d5e4
buzhash64: add FastCDC-style normalized chunking
Normalized chunking switches between a stricter and a looser cut mask
around the target chunk size. This greatly tightens the chunk-size
distribution (coefficient of variation ~0.9 -> ~0.3 in tests) and removes
the dedup-hostile max-size-clamped chunks, with unchanged deduplication.

chunker-params for buzhash64 gains a required 6th field, nc_level:

  buzhash64,chunk_min,chunk_max,chunk_mask,window_size,nc_level

Use nc_level=2 for the new default, nc_level=0 to disable (then behavior
is byte-identical to the previous single-mask chunker).

buzhash (32bit) is untouched and stays bit-compatible with borg 1.x.

The mask transition point (normal_size) defaults to a principled formula
(target minus the expected loose-phase tail) so the mean stays near the
target; it can be tuned via the normal_size constructor arg.

scripts/chunker_bench.py: evidence harness used to measure chunk-size
distribution, dedup ratio, throughput and shift-resilience.

Measurements (before = nc_level 0, after = nc_level 2; both at the default
params buzhash64,19,23,21,4095; measured with scripts/chunker_bench.py):

5 GiB of incompressible data (~2000-2700 chunks, statistically stable):

  before:  CV 0.739,  49 max-size-clamped (8 MiB) chunks,   953 MB/s
  after:   CV 0.311,   0 max-size-clamped chunks,          1024 MB/s

Re-backup of a 2.5 GiB file after a few scattered single-byte edits
(deduplication ratio; 0.5 = v2 fully deduplicated against v1, lower is
better):

   64 edits:  before 0.5424  ->  after 0.5235
  320 edits:  before 0.6791  ->  after 0.6142

Normalized chunking deduplicates better after edits: removing the
max-size-clamped chunks means a single-byte change invalidates much less
data (about 36% less dedup overhead at 320 edits). Throughput was also
consistently higher with nc_level=2 at this scale.

Also: fix bug when computing the mask, one needs to use 1ULL instead of
1, so the shifting computation is done in a uint64, not in a 32bit int.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 12:00:09 +02:00
Thomas Waldmann
5e27122735
replace create --hostname/--username with BORG_HOSTNAME/BORG_USERNAME env vars, fixes #9651
The --hostname/--username options on borg create (added in 2.0.0b21, #9402)
are removed in favor of the BORG_HOSTNAME / BORG_USERNAME environment variables.

When set, these override the hostname/username stored in newly created archives
and used by the {hostname}/{user} placeholders (so they also apply to archive
names, prune --glob-archives, check, etc.). Useful to run borg on host A but
impersonate host B.

The env vars are read at the point of use; fqdn/hostid (see BORG_HOST_ID) and
the auto-detection are intentionally left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 21:07:31 +02:00
Thomas Waldmann
66d010c2ac
docs: update / fix "internals" section 2026-06-23 11:19:38 +02:00
Hugo Wallenburg
c0a69611a8
Renames --since to --from 2026-06-20 18:36:59 +02:00
Hugo Wallenburg
89c6a2cccc
Improves interval example
Makes specific notes on week numbers, clears some ambiguity in the
yearly candidate wording, and more.

The matching test was previously missing assertions on the weekly
archives, now fixed along with better explanations.
2026-06-20 18:09:41 +02:00
Daniel Rudolf
1073da9eb1
Refactor the interval-based pruning example
Co-Authored-By: Hugo Wallenburg <hugo@hugow.no>
2026-06-20 18:09:39 +02:00
Hugo Wallenburg
304a2fa5b9
Removes --keep-last and --keep-within, superseded by --keep 2026-06-20 18:09:38 +02:00
Hugo Wallenburg
d9f9f1dd45
Updates prune parser epilog to match new int/interval behavior
Along with reordering and improvements.
2026-06-20 18:09:38 +02:00
Hugo Wallenburg
4382b3a8f2
Updates usage docs for prune and new int/interval handling 2026-06-20 18:09:38 +02:00
Hugo Wallenburg
f7a848ed6f
Rewords original prune example with more precise terminology 2026-06-20 18:09:37 +02:00
Hugo Wallenburg
318c53fcf9
Adds full-scale example using pruning intervals
Also rewrites some of the older example to match terminology and wording
from the newer example.
2026-06-20 18:09:37 +02:00
Mrityunjay Raj
27d693c222 repository: read-only check by hashing pack/index objects, refs #8476 #8572
Implement the read-only repository check by hashing pack and index
objects and comparing against the stored hashes, without writing to the
repository.

Report check progress separately for the index and for the packs, each
ending at 100%.
2026-06-19 23:30:33 +05:30
Thomas Waldmann
890da42276
support msgpack 1.2.1
Port of borgbackup/borg#9790 to master.

Note: the PR's second commit (Archive.delete: don't reuse msgpack Unpacker
after an unpacking failure) does not apply here - on master Archive.delete
no longer unpacks item metadata (it just removes the archive and lets
"borg compact" reclaim space), so the reuse-after-failure code path does
not exist. The streaming RobustUnpacker already creates a fresh Unpacker
on resync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:08:48 +02:00
Mrityunjay Raj
0ece418991 cleanup: drop leftover pack_id==chunk_id references after sha256 naming, refs #8572
Remove the dead BORG_TESTONLY_SHA256_PACK_ID tox env and CI job, fix the packs.rst pack-id docs, and reword comments/tests to describe sha256 pack naming instead of the removed shortcut.
2026-06-18 19:33:50 +05:30
Thomas Waldmann
912b2c50c8
docs: update structure diagram 2026-06-16 15:51:00 +02:00
Thomas Waldmann
48308f1969
misc docs updates 2026-06-16 15:21:57 +02:00
Thomas Waldmann
a7990c3702
update general docs 2026-06-16 14:46:57 +02:00
Thomas Waldmann
ce19629b34
docs: update repo-create examples for split --encryption/--id-hash
The repo-create.rst examples were not updated after --encryption was
split into --encryption + --id-hash. Use the real mode name (aes256-ocb)
and show --id-hash as an orthogonal option.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 14:28:03 +02:00
Thomas Waldmann
c4347a9dce
build usage / man 2026-06-16 14:17:43 +02:00
Thomas Waldmann
2eef6c8035
crypto: drop the NAME attribute; repo-info builds the suite string from ENC_NAME/IDHASH_NAME
NAME was only read by "borg repo-info" to show the crypto suite. Remove it from
all (current and legacy) key classes and let repo-info assemble the display from
the two real dimensions instead: "<mode>, <ENC_NAME>, <IDHASH_NAME>", e.g.
"Encrypted: Yes (repokey, aes256-ocb, sha256)" or
"Encrypted: No (repokey, authenticated, blake3)".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 19:38:32 +02:00
Thomas Waldmann
479a77b512
repo-info/list --json: report encryption + id_hash separately, #9168
Stop using key.ARG_NAME (the combined crypto-suite name) for the JSON output.
The "encryption" object now mirrors the split CLI options: the "mode" field is
replaced by "encryption" (cipher / AE algorithm, key.ENC_NAME) and "id_hash"
(id hash function, key.IDHASH_NAME).

This is a breaking change to the documented JSON API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 18:31:27 +02:00
Thomas Waldmann
29a760e2b3
repo-create: split --encryption into --encryption + --id-hash, #9168
The combined --encryption value packed two orthogonal dimensions (cipher / AE
algorithm and id hash function) into a single string, causing a combinatorial
explosion of mode names. Key location was already split out into --key-location.

Now:
- --encryption selects only the cipher / AE algorithm:
  none, authenticated, aes256-ocb, chacha20-poly1305
- --id-hash selects the id hash function: sha256 (default) or blake3
- --key-location (unchanged) selects key storage: repokey (default) or keyfile

The old combined names were removed (clean break): select a BLAKE3 suite via
--encryption ... --id-hash blake3 instead of blake3-*. aes-ocb was renamed to
aes256-ocb (key NAME shown by repo-info and ARG_NAME in JSON updated to match).
"none" has no key, so it only supports the sha256 id hash.

No on-disk format, key-type byte, or crypto behavior changes: the existing key
classes form a clean cross-product of {cipher} x {id-hash}, selected via the new
ENC_NAME / IDHASH_NAME class attributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 17:44:38 +02:00
TW
5e2da157be
Merge pull request #9769 from ThomasWaldmann/docs-key-subcommands
docs: add docs for "key add", "key list" and "key remove"
2026-06-13 23:47:58 +02:00
Thomas Waldmann
d5cd72b179 docs: add docs for "key add", "key list" and "key remove"
The multi-key feature (#9743) added the "borg key add", "borg key list"
and "borg key remove" subcommands but never wired up their docs:

- scripts/make.py: map key_add/key_list/key_remove to the "key" usage
  group, so build_man can locate their examples (it previously aborted
  with FileNotFoundError: docs/usage/key_add.rst).
- docs/usage/key.rst: include the three new generated snippets so they
  show up on the HTML key page.
- regenerate the affected docs: new key_{add,list,remove}.rst.inc usage
  snippets, new borg-key-{add,list,remove}.1 man pages, and borg-key.1
  (SYNOPSIS + SEE ALSO now reference the new subcommands).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:37:21 +02:00
Thomas Waldmann
8f4231d21b key: allow --key-location for authenticated* modes
The authenticated and authenticated-blake3 modes do not encrypt data, but
they still have a real key (id/auth key material) stored as a key blob.
That blob can live as a keyfile or as a repokey just like the encrypted
modes, so make it configurable instead of always forcing repokey storage.

- AuthenticatedKeyBase: set LOCATION_CONFIGURABLE = True so --key-location
  (at repo-create) and "borg key change-location" apply.
- key change-location: only copy sessionid/cipher when present (those are
  AEAD-only; authenticated keys do not have them).
- repo-info: report the key storage location for authenticated keys too,
  and handle the authenticated-blake3 variant (was only "authenticated").
- repo-create help: stop claiming authenticated* has no keyfile/repokey
  storage; only "none" truly has no key.
- add change-location round-trip tests for authenticated mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:57:26 +02:00
Thomas Waldmann
d2bc45f56d
key: unify keyfile/repokey classes, locate key independent of type byte (#9743)
Borg used to read the manifest's key-type byte and then look for the key in
exactly one place (keyfile or repokey) depending on the key class that byte
selected. As a result every crypto suite was duplicated into a keyfile class
and a repokey class that differed only in TYPE, NAME, ARG_NAME and STORAGE.

Now key *location* is independent of the type byte: detection tries keyfiles
first and repokeys afterwards until a passphrase unlocks a key. The type byte
still selects the crypto suite (id hash, MAC, cipher) to instantiate. Where a
key is stored (keyfile vs repokey) is therefore a per-key property
(self.storage), not a separate class, so a repository may even hold a mix of
keyfile- and repo-stored borg keys.

With storage decoupled from class identity, the keyfile/repokey class pairs
collapse into one class per crypto suite:
- modern AEAD: AESOCBKey, CHPOKey, Blake3AESOCBKey, Blake3CHPOKey
- legacy borg 1.x (read-only): AESCTRKey, Blake2AESCTRKey
There is now exactly one type byte per modern crypto suite (the old separate
repokey type bytes 0x11/0x21/0x31/0x41 were removed; borg2 is beta and only
needs to read repos it created). identify_key() matches on TYPES_ACCEPTABLE.

CLI: --encryption selects only the crypto suite (aes-ocb, chacha20-poly1305,
blake3-aes-ocb, blake3-chacha20-poly1305, authenticated*, none); the storage
location is chosen with the new --key-location=repokey|keyfile (default
repokey). The old combined modes (repokey-aes-ocb etc.) were removed.
borg key import also gained --key-location. borg key change-location no longer
swaps key classes or rewrites the manifest; it just re-saves the unlocked key
at the new location.

Keyfile removal (key remove, change-location) now overwrites the keyfile with
random data via secure_erase() before unlinking, consistent with save().

borg 1.x legacy read compatibility is preserved (the legacy class merge is a
behavior-preserving rename; the legacy type bytes incl. PASSPHRASE stay in
TYPES_ACCEPTABLE).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:48:45 +02:00
TW
c710edf0df
Merge pull request #9754 from ThomasWaldmann/simplify-location-parsing
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 (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
Simplify location parsing, remove socket: remainders
2026-06-11 10:48:23 +02:00
Thomas Waldmann
5eab183183
remove leftover socket: protocol code
The unix-socket transport (socket:// repositories, the --socket option and
"borg serve" over a socket) was never part of a stable borg 2 release and the
old RPC protocol it relied on is gone, so the remaining code was dead:

- legacy remote: drop the unreachable proto == "socket" connection branch and
  the now-unused self.sock handling, "import socket" and get_socket_filename
  import (LegacyRemoteRepository is only built for proto == "ssh")
- helpers: remove get_socket_filename() and its export
- parseformat: drop "socket" from local_path_re - socket:// is now treated like
  any other unknown scheme (a local path) rather than being special-cased
- tests: drop test_socket and the self.sock check in the legacy reopen helper
- docs: drop the stale --socket entry from the manually maintained
  common-options.rst.inc (the auto-generated usage/man docs are left untouched
  here and will be rebuilt in a separate commit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:51:55 +02:00
Thomas Waldmann
aa9f810453
parseformat: simplify Location parsing/validation, #9678
For sftp/http(s)/s3/b2/rclone repositories, borg only detects the scheme now
and hands the raw URL to borgstore, which parses and validates it - removing
the duplicate parsing borg used to do. Precise field extraction (user/host/
port/path) is kept only for the protocols borg itself reads: file, rest and
legacy ssh.

- drop http_re, s3_re, rclone_re and the sftp arm of the old ssh_or_sftp_re
- add a single scheme-detection pass-through against BORGSTORE_SCHEMES; reject
  unknown schemes (e.g. socket://) as before
- canonical_path() returns the processed URL for the delegated protocols, with
  embedded credentials stripped so secrets never reach the security state file
  or logs
- source local_path_re's scheme exclusions from BORGSTORE_SCHEMES
- create: use proto == "file" instead of "not location.host" for the local
  repo-dir inode skip

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:17:40 +02:00
Thomas Waldmann
0b103291b8
compact: invalidate cached chunk indexes before deleting objects, #9748
If `borg compact` was interrupted after deleting repository objects but
before writing the updated chunk index, the still-existing cache/chunks.*
kept claiming the deleted objects were present. A later `borg create` would
trust that stale index, skip re-uploading the affected chunks and silently
create an archive with dangling object references that extracts to zero bytes.

Invalidate all cached chunk indexes via delete_chunkindex_cache() before the
first object is deleted, so an interruption is conservative: the next client
rebuilds the index from actual repository contents and re-uploads any deleted
data. The post-deletion save_chunk_index() still writes a fresh, valid index.

Add a regression test covering both compact paths (default and --stats) that
interrupts compaction right before save_chunk_index() and verifies no cached
chunk index survives and a later create+extract reproduces the original bytes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:45:57 +02:00
TW
8509b3b7fa
Merge pull request #9751 from ThomasWaldmann/fix-9749
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 (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
files cache: don't empty cache on a no-change backup, #9749
2026-06-10 14:48:05 +02:00
Thomas Waldmann
c08c2ca461
files cache: don't empty cache on a no-change backup, #9749
FilesCacheMixin initialized _newest_cmtime to 0, but _write_files_cache()
only treats None as "no file was chunked this run" (falling back to a
max_time_ns cutoff that keeps all current entries).

When a backup reuses all files from the cache without chunking anything,
_newest_cmtime stayed at 0, so the race-protection cutoff became the unix
epoch and every current (age == 0) entry was discarded. The next backup
then had to re-read, chunk and hash all files again.

Initialize _newest_cmtime to None to match the documented contract in
_write_files_cache(), and make the comparisons in _build_files_cache()
None-safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 12:39:36 +02:00
Thomas Waldmann
31202ea4f1
remove xxhash / xxh64 requirement, mentions 2026-06-10 00:38:18 +02:00
TW
9b8fc60430
Merge pull request #9734 from ThomasWaldmann/borg-serve-rest
borg serve --rest: serve rest:// repositories with borg
2026-06-09 11:13:11 +02:00
Thomas Waldmann
a5ef482ca8
docs: offer a PDF download and link offline formats in the sidebar, fixes #9731
Enable the pdf output format on Read the Docs (the LaTeX build config
already existed in docs/conf.py) and add a "Downloads" line to the left
sidebar that links the offline formats (PDF, HTML zip, ePub). The links
are populated from the Read the Docs addons data, reusing the same
mechanism as the version selector, so they are version-correct and hidden
when unavailable. The line is left-aligned with the boxes above and the
table of contents below, with separators above and below it.

Also drop the stale 'resources' entry from latex_appendices (the page was
removed in #2088); it broke the now-enabled PDF build with a doctree
KeyError.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 02:08:14 +02:00
Thomas Waldmann
83b0dd66c7
improve docs / comments 2026-06-09 00:49:50 +02:00
Thomas Waldmann
5415062564 borg serve --rest: serve rest:// repositories with borg
Make `borg serve` able to be the server-side component of a rest:// repository,
selected with a new --rest option. Plain `borg serve` (no option) keeps serving
legacy borg-1.x repos and stays command-line compatible with borg 1.x.

- serve_cmd.py: add --rest and --backend. With --rest, serve the given
  --backend FILE:<path> on stdio via borgstore.server.rest.serve(); honor
  --restrict-to-path/--restrict-to-repository (validated against the FILE path)
  and --permissions (mapped via borg_permissions). Without --rest, run the legacy
  RepositoryServer as before.
- repository.py: for rest:// locations, build the borgstore REST backend with a
  command that runs `borg serve --rest --backend FILE:<path>` (locally via
  sys.executable, or over ssh reusing borgstore's ssh_cmd / BORG_REMOTE_PATH),
  instead of borgstore's hardcoded `borgstore-server-rest`. So a remote only needs
  borg installed. Extracted the permissions string->dict mapping into the reusable
  borg_permissions().
- tests: unit tests for the rest serve command builder. The existing
  remote_archiver (rest:///) suite now runs against `borg serve --rest`.
- docs: changelog + quickstart updated.

Legacy serve and the legacy ssh client are unchanged (client still spawns plain
`borg serve`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 14:52:41 +02:00
Thomas Waldmann
cac7237d3f remove ssh:// and socket:// remote repository for current repos
The modern client/server transport (RemoteRepository served by `borg serve`
over an msgpack RPC protocol) is now redundant for current (borg 2) repos:
its functionality is replaced by rest:// (which can tunnel over ssh to a
remote borgstore REST server).

Remove the modern RemoteRepository (both ssh:// and socket://) entirely.
Legacy v1 (borg 1.x) repos remain reachable over ssh:// via the separate
LegacyRemoteRepository client, and `borg serve` / RepositoryServer is kept,
trimmed to the legacy-only path, so a remote borg2 can still serve a v1 repo
for `borg transfer --from-borg1`.

Details:
- remote.py: delete RemoteRepository, SleepingBandwidthLimiter and the `api`
  decorator; trim RepositoryServer to legacy-only (drop modern _rpc_methods,
  socket serving, non-legacy open() branch); keep cache_if_remote /
  RepositoryCache / RepositoryNoCache (used by all repos).
- get_repository(): non-legacy ssh:// now raises a clear "use rest://" error;
  socket:// route and the global --socket option removed.
- parseformat: drop the socket:// scheme (now an invalid location).
- borg serve: keep the command (serves legacy v1 ssh only); update epilog.
- borg version: drop modern remote query; keep legacy ssh path.
- update isinstance/import sites (cache, archive, fuse/hlfuse, analyze/compact,
  archiver __init__ -> LegacyRemoteRepository.RPCError).
- tests/docs updated; obsolete socket serve test removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 08:04:59 +02:00
Thomas Waldmann
ff6d0e8775
fix typos / grammar in transfer docs 2026-06-06 19:34:46 +02:00
Thomas Waldmann
5d8b761a6c
crypto: integrate blake3, blake2b is legacy, fixes #8867
BLAKE3 is generally faster and provides a more modern construction for
keyed hashing (using its internal keyed mode instead of the construction
used for BLAKE2b).

Key types changed:
- authenticated-blake2 -> authenticated-blake3
- {keyfile,repokey}-blake2-aes-ocb -> {keyfile,repokey}-blake3-aes-ocb
- {keyfile,repokey}-blake2-chacha20-poly1305 -> {keyfile,repokey}-blake3-chacha20-poly1305

This also fixes the slightly unusual way how we used blake2b,
it is only supported for importing borg 1.x repos.

New repos either use HMAC-SHA256 or BLAKE3.
2026-06-06 19:34:45 +02:00
Thomas Waldmann
dd4ba13066
remove python 3.10 support (master branch), fixes #9707 2026-06-06 15:34:05 +02:00
Thomas Waldmann
d6eb910c21
update CHANGES 2026-06-02 11:34:42 +02:00
Thomas Waldmann
39ac734b9c
support "rest:" repository URLs, fixes #9593
That is borgstore's REST http over stdio (over ssh, if a host is given).
2026-06-01 21:11:55 +02:00