73 Commits
Author SHA1 Message Date
Thomas WaldmannandClaude Opus 5.5 db0c4ac2c1 docs: ssh:// repository URLs, #9765
Describe ssh:// repository URLs for current repositories (served by a
remote "borg serve --rest") and for legacy borg 1.x repositories (with
--from-borg1, served by a remote "borg serve") and add a change log
entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-24 15:55:01 +02:00
TW 0dd454d7f8 Merge pull request #10405 from ThomasWaldmann/docs-yubikey
docs: derive the borg passphrase from a YubiKey (challenge-response)
2026-09-23 02:25:48 +02:00
Thomas WaldmannandClaude Fable 5 eff90e0c39 docs: deployment guide for YubiKey challenge-response passphrases
New deployment chapter deriving the borg passphrase from a YubiKey OTP
slot's HMAC-SHA1 challenge-response via BORG_PASSCOMMAND: only a random
challenge is stored, the passphrase itself is computed by the token on
every unlock (the long-proven KeePassXC-style mechanism, as also
documented for restic in the Arch wiki).

Covers programming a slot with and without touch (touchless =
unattended backups, --touch = presence-gated interactive use),
redundant twin YubiKeys via a shared slot secret, adding the derived
passphrase as an additional borg key to an existing repository, the
paper copy of the derived passphrase as the recovery path, and honest
caveats: Yubico-proprietary (not on other vendors' keys nor the
FIDO2-only Security Key series - the age guide covers those), two
scarce slots, device-bound vs presence-gated threat model, macOS Input
Monitoring permission, and ykman instead of the deprecated ykpers
tooling.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-22 19:16:02 +02:00
Thomas WaldmannandClaude Fable 5 08e891c0f4 docs: deployment guide for age-based passphrase protection (hardware keys)
New deployment chapter showing how to combine BORG_PASSCOMMAND with
age: a strong random borg passphrase stored age-encrypted, decrypted on
demand - and, via the age plugin ecosystem, bound to hardware: any
FIDO2 security key (age-plugin-fido2-hmac, touch-gated by CTAP spec,
interactive use), YubiKey PIV (age-plugin-yubikey, policies allow
silent unattended use), TPM 2.0 (age-plugin-tpm) and Apple Secure
Enclave (age-plugin-se) for machine-bound unattended backups.

The guide starts with a plain no-hardware example to introduce the
pattern, gives an at-a-glance table of what works unattended vs. what
requires user presence, covers multi-recipient redundancy (several
YubiKeys / TPM unlocking the same passphrase), the offline paper copy
as the recovery path, revocation (change-passphrase, not just
re-encrypting) and an honest threat-model note (at-rest protection;
presence-gated options prevent silent unlocking, device-bound ones do
not).

This is the supported way to use hardware-backed key protection with
borg, instead of borg-native hardware integrations. See the discussion
in borgbackup/borg#8995 / borgbackup/borg#10399.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-22 18:50:57 +02:00
TW 6932422fff Merge pull request #10255 from ThomasWaldmann/fix-deployment-forced-commands
docs: explain how sshd forced commands interact with borg serve --rest
2026-08-29 00:17:03 +02:00
Thomas WaldmannandClaude Fable 5 1b1dc7ce85 docs: use archive series names in the automated-local example
The example script used $DATE-$$-system / $DATE-$$-home archive names,
so every run created a new series and the per-series files cache never
matched, re-chunking everything. Use fixed names (system, home) so all
runs form one series per data set; runs are distinguished by archive ID
and timestamp (see borg repo-list).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-28 23:37:15 +02:00
Thomas WaldmannandClaude Fable 5 4d6d4f4072 docs: explain how sshd forced commands interact with borg serve --rest
Document that the forced command does not name the repository: the
client selects it via --backend FILE:<path> carried in
SSH_ORIGINAL_COMMAND, which borg serve validates against the
--restrict-to-* options. Also mention --restrict-to-path as the
multi-repo alternative and show the client-side URL form.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-28 23:25:39 +02:00
Thomas WaldmannandClaude Fable 5 f36a3ac7ce docs: update deployment docs to borg2 commands and rest protocol
- pull-backup: switch the socat recipe to borg serve --rest with
  rest:// URLs (mechanism verified end-to-end; note added that socat
  pins the server-side --backend repo), fix the ssh-agent section
  (borg repo-create --encryption aes256-ocb --key-location repokey
  instead of borg init --encryption repokey, forced command with
  --rest and --restrict-to-repository), and fix the remote-forwarding
  example (rest:// URL, -r option, mandatory archive name).
- automated-local: borg init -> borg repo-create -r; convert the
  borg1 repo::archive syntax in the create calls.
- hosting-repositories: the authorized_keys forced command needs
  --rest (clients cannot supply it - it is deliberately not in the
  client-arg allowlist), plus repo-create wording.
- image-backup: borg list -> borg repo-list -r for the archive
  listing; add a note about archive series (names without timestamps
  match multiple archives on extract; use aid:<id>).

All replacement commands were run against scratch repositories; the
forced-command semantics were verified via Archiver.get_args().

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-28 12:37:06 +02:00
Thomas Waldmann f144bac320 remove --rsh option, use BORG_RSH
Like --remote-path, --rsh was only honoured on the legacy (borg 1.x, ssh://)
code path. For borg2 repositories the remote shell command comes from
borgstore, which reads its own BORGSTORE_RSH environment variable, so --rsh
silently had no effect there.

Remove the option; BORG_RSH is now the only way to set the remote shell
command. For borgstore-based repositories, borg gives the BORG_RSH value to
borgstore as BORGSTORE_RSH, except if that was set explicitly (then the user
wants a different command for borgstore).

borg benchmark crud does not need to inherit --rsh / --remote-path into its
sub-invocations any more (environment variables are inherited anyway), so the
parse_args wrapper is gone.
2026-07-24 23:10:50 +02:00
Thomas WaldmannandClaude Opus 4.8 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 <[email protected]>
2026-06-08 08:04:59 +02:00
TWandCopilot Autofix powered by AI 620e2534b8 Apply suggested fix to docs/deployment/pull-backup.rst from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-05-14 00:18:42 +02:00
TWandCopilot Autofix powered by AI b404c36ae0 Apply suggested fix to docs/deployment/pull-backup.rst from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-05-14 00:18:41 +02:00
TWandCopilot Autofix powered by AI 4fcc2cc1d2 Apply suggested fix to docs/deployment/pull-backup.rst from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-05-14 00:18:41 +02:00
Thomas Waldmann f40878e1e7 docs: sshfs + chroot does support different CPU architectures, fixes #6878
(cherry picked from commit 49365617c4)
2026-05-13 20:19:46 +00:00
Thomas Waldmann 3120f9cd1c fixed typos and grammar (AI)
this was done by Junie AI.
2025-09-23 14:56:23 +02:00
Thomas Waldmann 9e6d90754e remove remainders of append-only support
Some features like append-only repositories rely on a server-side component
that enforces them (because that shall only be controllable server-side,
not client-side).

So, that can only work, if such a server-side component exists, which is the
case for borg 1.x ssh: repositories (but not for borg 1.x non-ssh: repositories).

For borg2, we currently have:
- fs repos
- sftp: repos
- rclone: repos (enabling many different cloud providers)
- s3/b3: repos
- ssh: repos using client/server rpc code similar as in borg 1.x

So, only for the last method we have a borg server-side process that could enforce some features, but not for any of the other repo types.

For append-only the current idea is that this should not be done within borg,
but solved by a missing repo object delete permission enforced by the storage.

borg create could then use credentials that miss permission to delete,
while borg compact would use credentials that include permission to delete.
2025-04-28 18:55:15 +02:00
Thomas Waldmann 48b39d878f remove remainders of quota support
Some features like repository quotas rely on a server-side component
that enforces them (because that shall only be controllable server-side,
not client-side).

So, that can only work, if such a server-side component exists, which is the
case for borg 1.x ssh: repositories (but not for borg 1.x non-ssh: repositories).

For borg2, we currently have:
- fs repos
- sftp: repos
- rclone: repos (enabling many different cloud providers)
- s3/b3: repos
- ssh: repos using client/server rpc code similar as in borg 1.x

So, only for the last method we have a borg server-side process that could enforce some features, but not for any of the other repo types.

For quotas the current idea is that this should not be done within borg,
but enforced by a storage specific quota implementation (like fs quota,
or quota of the cloud storage provider). borg could offer information
about overall repo space used, but would not enforce quotas within borg.
2025-04-28 16:57:30 +02:00
vancheese 8df4bf75d4 docs: borg commands updated with --repo option, fixes #8550 2025-04-01 17:28:57 +02:00
jan de9d46acf0 docs: modify docs for automated backup to append to SYSTEMD_WANTS rather than overwrite
fixes #8641
In the example, setting SYSTEMD_WANTS instead of appending may prevent
other autostart services attached by earlier udev rules from launching.
This commit changes = to += to fix this behavior.
2025-01-19 14:41:52 +01:00
jan 113e1b7fb2 docs: fix udev rule priority in automated-local.rst
fixes #8639
The priority of 40 for the udev rules as stated in to documentation
applies the rule too early on some systems, which prevents the rule from
matching. This commit changes the priority to 80.
2025-01-18 14:22:47 +01:00
Thomas Waldmann 1bc5902718 docs: update about archive series
in borg 1.x, we used to put a timestamp into the archive name to make
it unique, because borg1 required that.

borg2 does not require unique archive names, but it encourages you
to even use an identical archive name within the same SERIES of archives.
that makes matching (e.g. for prune, but also at other places) much
simpler and borg KNOWS which archives belong to the same series.
2024-09-18 14:05:12 +02:00
Eddie Carswell 9fe3cb686f Update repository URLs in docs to use new syntax
Fixes #8361

Signed-off-by: Eddie Carswell <[email protected]>
2024-09-11 22:03:59 -05:00
Thomas Waldmann ace97fadec docs: updates / removing outdated stuff 2024-09-08 12:00:50 +02:00
Thomas Waldmann 5e3f2c04d5 remove archive checkpointing
borg1 needed this due to its transactional / rollback behaviour:
if there was uncommitted stuff in the repo, next repo opening automatically
rolled back to last commit. thus we needed checkpoint archives to reference
chunks and commit the repo.

borg2 does not do that anymore, unused chunks are only removed when the
user invokes borg compact.

thus, if a borg create gets interrupted, the user can just run borg create
again and it will find some chunks are already in the repo, making progress
even if borg create gets frequently interrupted.
2024-09-07 22:00:54 +02:00
Ruben Rodriguez 6978584de6 docs: align /etc/backups path in all references 2024-08-01 15:31:38 +02:00
Thomas Waldmann 6121d3d2e6 docs: remove tabs 2024-02-25 12:14:52 +01:00
Stephan Herbers 274cd8f121 add restore considerations paragraph 2024-02-24 21:17:22 +01:00
Stephan HerbersandNetSysFire 96ae9f73eb Apply suggestions from code review
Co-authored-by: NetSysFire <[email protected]>
2024-02-24 21:17:09 +01:00
Stephan Herbers a06c42cf1f add non-root deployment strategy 2024-02-24 21:17:01 +01:00
zDEFz c4decb4fff make SERIAL backup method compatible to borg2 2023-11-13 20:23:52 +01:00
zDEFz 6bbd327dc2 Added backup by serial method documentation (#7932)
docs: create disk/partition sector backup by disk serial number
2023-11-13 13:45:19 +01:00
TW 56dfc6dc04 Merge pull request #7567 from azrdev/patch-1
automated-local.rst: use GPT UUID for consistent udev rule
2023-07-11 00:06:25 +02:00
azrdev 27bcc0f05a automated-local.rst: Partition table UUID match works for MBR too
not only GPT
2023-06-16 23:28:36 +02:00
Thomas Waldmann fbf463496b docs: fix some markup / linking issues 2023-06-11 23:03:21 +02:00
azrdev 843496dac9 automated-local.rst: use GPT UUID for consistent udev rule 2023-05-14 14:52:39 +02:00
Dominik Stadler 753419d506 Suggest to use forced command when using remote-fowarding via ssh 2023-04-02 22:58:37 +02:00
Dominik Stadler d2ff0a3aab Adjust description some more, use back-quotes properly, add some links 2023-04-02 11:15:21 +02:00
Dominik Stadler 6ab281875e Adjust repository path 2023-04-02 11:05:31 +02:00
Dominik Stadler 8fab4e4152 Fix command and add more notes 2023-04-02 11:03:32 +02:00
Dominik Stadler 4216dfd12d Describe performing pull-backups via ssh remote forwarding 2023-04-02 10:52:36 +02:00
Paul D 253d8e8d4e Docs grammar fixes
joined split infinitives, and relocated adverbs appropriately.
2022-12-29 22:26:54 +00:00
Paul D a85b643866 Docs grammar fixes.
One cannot "to not x", but one can "not to x".
Avoiding split infinitives gives the added bonus that machine
translation yields better results.

setup (n/adj) vs set(v) up. We don't "I setup it" but "I set it up".

Likewise for login(n/adj) and log(v) in, backup(n/adj) and back(v) up.
2022-12-29 00:01:48 +00:00
Thomas Waldmann ad7c7159b2 Merge branch 'master' into borg2 2022-07-27 13:49:50 +02:00
a1346054 160dd877ab fix typos 2022-07-22 15:51:46 +00:00
Thomas Waldmann dbe62b8074 docs: replaced tabs by spaces 2022-07-05 00:32:57 +02:00
Thalian b4d3859b9e #6407 - Document Borg 1.2 pattern behavior change
Make clear that absolute paths always go into the matcher as if they are relative (without leading slash). Adapt all examples accordingly.

fixes #6407
2022-05-27 14:13:12 +02:00
Thomas Waldmann 61299d23db Revert "Remove scp syntax for locations (#6697)"
This reverts commit 1b4b84dfd8.
2022-05-18 17:31:10 +02:00
Emil M George 1b4b84dfd8 Remove scp syntax for locations (#6697)
remove scp syntax support from cli and from Location parser, add note about converting scp-style URLs to ssh-style, fixes #6691
2022-05-15 21:55:19 +02:00
Michael Bauer 638774761c use --numeric-ids in pull doc
replace flag --numeric-owner with --numeric-ids
2022-03-09 21:43:22 +01:00
Andrey BienkowskiandAndrey Bienkowski dbfef31783 borg serve: improve ssh forced commands docs (#6083)
borg serve: improve ssh forced commands docs

Co-authored-by: Andrey Bienkowski <[email protected]>
2021-12-10 18:11:25 +01:00