Skip to content

remove remainders of append-only support #8798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

ThomasWaldmann
Copy link
Member

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.

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.
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.63%. Comparing base (48b39d8) to head (477e8f5).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8798   +/-   ##
=======================================
  Coverage   81.62%   81.63%           
=======================================
  Files          74       74           
  Lines       13278    13256   -22     
  Branches     1961     1955    -6     
=======================================
- Hits        10838    10821   -17     
+ Misses       1770     1767    -3     
+ Partials      670      668    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann ThomasWaldmann merged commit d11ba6e into borgbackup:master Apr 28, 2025
15 checks passed
@ThomasWaldmann ThomasWaldmann deleted the remove-append-only branch April 28, 2025 20:30
@Wqrld
Copy link

Wqrld commented Jun 7, 2025

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.

Would this work? I assume borg would need file edit permissions even to create backups, in which case you could just write garbage to the files or encrypt them á la ransomware.

I think some form of append-only is very important to have, but i understand if the borg 1.0 system was too hacky to keep.

@ThomasWaldmann
Copy link
Member Author

@Wqrld you can test it in master branch. The "no-delete" permission disallows deleting objects as well as overwriting existing objects.

@Wqrld
Copy link

Wqrld commented Jun 8, 2025

Oh, amazing! Thanks for the great software!

@ThomasWaldmann
Copy link
Member Author

See also my comment there:

https://news.ycombinator.com/item?id=44216394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants