Specify which hooks to run via command line option #887

Open
opened 2024-06-25 10:27:16 +00:00 by sshaikh · 1 comment

What I'd like to do and why

There are two times when I may not want hooks to run for a given config:

  1. When running bespoke one off commands on demand
  2. If existing hooks involve running borgmatic (to avoid recursion)

Adding a --hooks option to explicitly specify which hooks to run would help with the general case, with the specific cases of:

  1. The default is to run all hooks.
  2. Specifying it empty would run no hooks (or perhaps maybe using an explicit none parameter).

Other notes / implementation ideas

No response

### What I'd like to do and why There are two times when I may not want hooks to run for a given config: 1. When running bespoke one off commands on demand 2. If existing hooks involve running borgmatic (to avoid recursion) Adding a `--hooks` option to explicitly specify which hooks to run would help with the general case, with the specific cases of: 1. The default is to run all hooks. 2. Specifying it empty would run no hooks (or perhaps maybe using an explicit `none` parameter). ### Other notes / implementation ideas _No response_
sshaikh changed title from Specify hooks to run via command line option to Specify which hooks to run via command line option 2024-06-25 10:27:26 +00:00
Owner

Seems reasonable to me! Note that you may be able to accomplish this today with one or more --override work-arounds.

Seems reasonable to me! Note that you may be able to accomplish this today with one or more [`--override`](https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#configuration-overrides) work-arounds.
witten added the
new feature area
label 2024-07-04 06:18:47 +00:00
Sign in to join this conversation.
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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