Custom command option for SQLite hook #836

Closed
opened 2024-03-03 22:39:44 +00:00 by witten · 6 comments
Owner

What I'd like to do and why

Implement a new configuration option for the existing SQLite hook to run a custom SQLite command for dumping or restoring instead of the default sqlite3.

Broken off from #311.

Other notes / implementation ideas

Make sure to use shlex shell escaping to prevent shell injections attacks. See the other database hooks for an example.

### What I'd like to do and why Implement a new configuration option for the existing SQLite hook to run a custom SQLite command for dumping or restoring instead of the default `sqlite3`. Broken off from #311. ### Other notes / implementation ideas Make sure to use `shlex` shell escaping to prevent shell injections attacks. See the other database hooks for an example.
witten added the good first issue label 2024-03-03 22:39:52 +00:00
witten changed title from Custom command options for SQLite hook to Custom command option for SQLite hook 2024-03-03 22:40:15 +00:00

Such an option (in analogy to the ones for PostgreSQL) would also be very useful in case sqlite3 has to execute within a container, while borgmatic is running on the host. At least until borgmatic comes up with a global option that says "run this hook in a docker container".

Such an option (in analogy to the ones for PostgreSQL) would also be very useful in case sqlite3 has to execute within a container, while borgmatic is running on the host. At least until borgmatic comes up with a *global* option that says "run this hook in a docker container".
Author
Owner

Yeah, unlocking use cases like that is one of the primary reasons to do this ticket!

Yeah, unlocking use cases like that is one of the primary reasons to do this ticket!
Contributor

I want to work on this issue.

I want to work on this issue.
Contributor

I am working on a similar issue #837 . Is it alright if I work on this too?

I am working on a similar issue #837 . Is it alright if I work on this too?
Author
Owner

@120EE0980 commented first, so unless they want to give up the ticket, I'd say it's theirs to implement for now. With a larger ticket, there might be an opportunity to collaborate, but I think this one is pretty small.

@gautamaggarwal2810, there are plenty of other "good first issues" issues though to choose from. Hopefully something there looks interesting to you.

I will say that I appreciate both of your interest here!

@120EE0980 commented first, so unless they want to give up the ticket, I'd say it's theirs to implement for now. With a larger ticket, there might be an opportunity to collaborate, but I think this one is pretty small. @gautamaggarwal2810, there are plenty of other ["good first issues"](https://projects.torsion.org/borgmatic-collective/borgmatic/issues?q=&type=all&state=open&labels=52&milestone=0&assignee=0&poster=) issues though to choose from. Hopefully something there looks interesting to you. I will say that I appreciate both of your interest here!
Author
Owner

Released in borgmatic 2.0.0!

Released in borgmatic 2.0.0!
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#836