Suggestion: Add TMPDIR as a configuration option to the YAML configuration file #341
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#341
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I am using borgmatic to backup a linux server that mounts
/tmp
withnoexec
privileges. This means I need to specify a different tempdir by using theTMPDIR
env variable on every borg/borgmatic command, e.g.:Whenever I forget to specify the
TMPDIR
variable borg fails with a very cryptic error, that usually keeps me blocked for a couple of minutes until I remember what was missing.Do you think it would be possible to add a configuration option to
/etc/borgmatic/config.yml
that specifies a non-default tempdir? Are there any drawbacks to this idea? Is this a feature you would be interested in including? If so, maybe I could try to do it myself (with some guidance :).Alternatively, is there a way to achieve the desired effect without adding this extra functionality?
IMHO, part of the appeal of borgmatic, is not needing to have to remember and type all the configuration flags and enviroment variables that borg requires, but instead having a central config file that you can have as a reference. I believe this addition would be very welcome for scenarios like mine.
This totally makes sense to me! I don't know of another way to achieve this, except perhaps with a shell alias for
borgmatic
.. which would be kind of obnoxious.Anyway, if you'd like to take a stab at this, please let me know! A good place to start would be having a look at
borgmatic/config/schema.yaml
. There are a number of existing Borg environment variables that are defined there are configuration options (e.g.borg_base_directory
). I could see calling this new option justtemporary_directory
or something, as it's not necessarily Borg-specific.In terms of where those options get turned into environment variables, that's in
borgmatic/borg/environment.py
. This should hopefully be pretty straight-forward to add and get working.Let me know if you have any questions! And thank you for the feature suggestion.
Thanks for the PR! Merged in master and marking this done. It'll be part of the next release.
Excellent, looking forward!
Thanks for your guidance... and the excellent software :)
Just released in borgmatic 1.5.11!