Skip to content

repo commands renamed r* -> repo-*#8358

Merged
ThomasWaldmann merged 10 commits into
borgbackup:masterfrom
ThomasWaldmann:repo-commands-rename
Sep 9, 2024
Merged

repo commands renamed r* -> repo-*#8358
ThomasWaldmann merged 10 commits into
borgbackup:masterfrom
ThomasWaldmann:repo-commands-rename

Conversation

@ThomasWaldmann
Copy link
Copy Markdown
Member

@ThomasWaldmann ThomasWaldmann commented Sep 8, 2024

Fixes #8292.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.74%. Comparing base (3794e32) to head (cfd35b4).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/borg/archiver/repo_compress_cmd.py 83.33% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8358   +/-   ##
=======================================
  Coverage   81.73%   81.74%           
=======================================
  Files          70       70           
  Lines       12648    12648           
  Branches     2287     2287           
=======================================
+ Hits        10338    10339    +1     
  Misses       1665     1665           
+ Partials      645      644    -1     

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

@ThomasWaldmann
Copy link
Copy Markdown
Member Author

ThomasWaldmann commented Sep 8, 2024

While working on this, I thought we maybe should rename some other commands also.

disambiguation / split vs. describing scope

The initial reason to have * and repo-* commands was to split and disambiguate them, e.g. delete deletes archive(s), while repo-delete deletes a repository. This makes the argparser and docs a lot easier, if 2 rather different commands are not mixed into 1 (as it was in borg 1.x).

But the command name could also describe the scope the command works on: full repo vs. archive(s).

compact

Thus compact maybe should be rather repo-compact (same as we already have repo-compress although there was no disambiguation needed for that).

check

This is currently a mixed-scope command, there is the --repository-only part doing the full repo low-level check and the --archives-only higher level check. By default it runs both of them.

prune

Difficult. Potentially works on the full repo, but rules rather apply on the archive level.

@ThomasWaldmann
Copy link
Copy Markdown
Member Author

@RonnyPfannschmidt @witten @m3nu @sophie-h ^

@RonnyPfannschmidt
Copy link
Copy Markdown
Contributor

I'd not give prune/check prefixes for now

The repo only/Archive only versions could be turned into separate prefixed commands

Prune is kind of a repo wide operation that's specifically targeting the full list of archives

@ThomasWaldmann ThomasWaldmann marked this pull request as ready for review September 9, 2024 09:23
@ThomasWaldmann
Copy link
Copy Markdown
Member Author

Still need feedback on borg compact vs. borg repo-compact.

That works on full repo scope, but it's doing the garbage collection by looking at all archives.

@ThomasWaldmann
Copy link
Copy Markdown
Member Author

Will merge this soon to avoid conflicts. Can work on compact in another PR...

@m3nu
Copy link
Copy Markdown
Contributor

m3nu commented Sep 9, 2024

Still need feedback on borg compact vs. borg repo-compact.

When in doubt and since this operates on both, I'd keep the old version of borg compact.

@ThomasWaldmann ThomasWaldmann merged commit 0069477 into borgbackup:master Sep 9, 2024
@ThomasWaldmann ThomasWaldmann deleted the repo-commands-rename branch September 9, 2024 11:38
@witten
Copy link
Copy Markdown
Contributor

witten commented Sep 9, 2024

I second keeping borg compact as-is, unless you're planning on splitting it into two separate subcommands, one for repos and one for archives.

@ThomasWaldmann
Copy link
Copy Markdown
Member Author

@witten there is nothing to compact "in archives".

It just needs to analyze the archives to know what chunks are in use, so it can delete those which aren't used. It also computes some stats as a side effect (-v).

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.

borg2 commands: use repo-*, not r*

5 participants