Skip to content

borg2: Make serve --rest the default, move legacy support to a --legacy option #9766

@PhrozenByte

Description

@PhrozenByte

After the removal of the legacy RPC protocol with #9732 (with a few exceptions, see below), it might be worth considering making the REST protocol the default mode of borg2 serve.

At this point, client-side use of the legacy RPC protocol is limited to borg2 transfer --from-borg1, where it is only used to migrate an existing borg1 repo to borg2. On the server side, borg2 serve still supports serving a borg1 repo via the legacy RPC protocol so users do not need to keep a separate borg1 installation around during migration.

However, borg2 serve still defaults to the legacy RPC protocol and requires --rest to serve a borg2 repo via the new REST protocol. I suggest inverting this default: borg2 serve should serve a borg2 repo via the REST protocol by default. Serving a borg1 repo via the legacy RPC protocol should require an explicit option such as --legacy.

In general, legacy compatibility modes should require explicit opt-in, while the default behavior should reflect the current architecture.

The main downside is that existing SSH forced-command configurations would need to be adjusted. However, borg2 is already a breaking release, and the remaining legacy RPC support exists primarily to facilitate migration from borg1. Given that context, requiring an explicit compatibility flag for legacy operation seems reasonable.

Prior discussion: #9593 (comment)
Related: #9765

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions