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
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 servestill 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 servestill defaults to the legacy RPC protocol and requires--restto serve a borg2 repo via the new REST protocol. I suggest inverting this default:borg2 serveshould 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