Add output dir option to backup command #6349
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #6347, #5973
I added the CLI option as discussed in #6347. As I mentioned, I'm not familiar with Rust. I tested my changes to confirm they work, but I don't know anything about Rust best practices.
While implementing this, I noticed that there seem to be three ways to trigger the backup process: via the CLI, the USR1 signal or an API call. Bearing this in mind, I'm wondering whether the current approach is sensible, given that only the CLI will benefit from the change. Might it be more future-proof to add a config entry for the backup path instead of the CLI option to handle all three variants in the same way? For this reason, I am opening this as a draft to discuss this question.
Thanks in advance for spending time on my PR/feature request.