--repository option for all subcommands #564

Closed
opened 2022-07-21 21:39:06 +00:00 by eoli3n ยท 10 comments

--repository option should be directly under the borgmatic command, and not under specific subcommands.

It would allow to trigger any subcommand only on a specific repository.

``--repository`` option should be directly under the borgmatic command, and not under specific subcommands. It would allow to trigger any subcommand only on a specific repository.
Owner

I've decided to add the --repository flag to individual borgmatic actions rather than as a global flag, because certain actions by their nature don't operate on a repository. For instance, borgmatic umount only operates on a mounted path. Additionally, I think it will help discoverability if --repository shows up in the help for individual actions.

Here are the actions that need --repository support added as part of this ticket:

  • rcreate (formerly init)
  • prune
  • compact
  • create
  • check
I've decided to add the `--repository` flag to individual borgmatic actions rather than as a global flag, because certain actions by their nature don't operate on a repository. For instance, `borgmatic umount` only operates on a mounted path. Additionally, I think it will help discoverability if `--repository` shows up in the help for individual actions. Here are the actions that need `--repository` support added as part of this ticket: * [x] `rcreate` (formerly `init`) * [x] `prune` * [x] `compact` * [x] `create` * [x] `check`
witten added the
good first issue
label 2023-02-04 17:13:25 +00:00
Contributor

Status-check: Is rcreate already done?
I see it mentioned in the docs https://torsion.org/borgmatic/docs/reference/command-line/

Is it that it needs handling when there is no config file with the repository in it?

Status-check: Is rcreate already done? I see it mentioned in the docs https://torsion.org/borgmatic/docs/reference/command-line/ Is it that it needs handling when there is no config file with the repository in it?
Contributor

I've been reading through the code figuring out an implementation.

2a36a2a312 suggests it's done for rcreate.

I can model the rest on it. (WIP)

I've been reading through the code figuring out an implementation. https://projects.torsion.org/borgmatic-collective/borgmatic/commit/2a36a2a312a140dae7ef84e6698d26014c5e2acd suggests it's done for rcreate. I can model the rest on it. (WIP)
Owner

Yeah, it's done for rcreate. This ticket would be adding it for all actions (that it makes sense on).

Yeah, it's done for `rcreate`. This ticket would be adding it for *all* actions (that it makes sense on).
Owner

Implemented by @nain in #652. Will be part of the next release!

Implemented by @nain in #652. Will be part of the next release!
Author

thanks !

thanks !
Author

hey, I forgot to talk about borgmatic list which should get --repository too

  • list
  • info

Already ok

hey, I forgot to talk about ``borgmatic list`` which should get ``--repository`` too - [x] list - [x] info Already ok
Owner

Looks like those already have --repository flags according to --help...? Some of them have gotten added piecemeal over time. But please let us know if we missed anything else.

Looks like those already have `--repository` flags according to `--help`...? Some of them have gotten added piecemeal over time. But please let us know if we missed anything else.
Author

Yes, it does, tested and approved :)

Yes, it does, tested and approved :)
Owner

Just released in borgmatic 1.7.9!

Just released in borgmatic 1.7.9!
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#564
No description provided.