mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 18:09:41 -04:00
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> |
||
|---|---|---|
| .. | ||
| 3rd_party | ||
| _static | ||
| _templates | ||
| binaries | ||
| borg_theme/css | ||
| deployment | ||
| internals | ||
| man | ||
| misc | ||
| usage | ||
| authors.rst | ||
| book.rst | ||
| changes.rst | ||
| changes_0.x.rst | ||
| changes_1.x.rst | ||
| conf.py | ||
| deployment.rst | ||
| development.rst | ||
| faq.rst | ||
| global.rst.inc | ||
| index.rst | ||
| installation.rst | ||
| internals.rst | ||
| introduction.rst | ||
| Makefile | ||
| man_intro.rst | ||
| quickstart.rst | ||
| quickstart_example.rst.inc | ||
| support.rst | ||
| usage.rst | ||
| usage_general.rst.inc | ||