Ability to set more environment variables
Would it be possible to add the ability to set a few more environment variables?
I do not keep my cache directory in my home folder. My scripts use the environment variable to set it to another location...
Can you add that capability?
Awesome project!
Thanks
What we could do is to allow this in the config file. Just to let any option to pass through.
Something like
create: {
compression: 'whatever'
...
}
Would you like to submit a PR?
I think that would be a good solution.
I would like to help out with coding, but I would have no idea how to...I saw your project on the Borg Github page and gave it a shot...It looks great!
Is this something that you would want to implement?
Thanks!
Yep, no worries.
I'll implement it in the next release.
Awesome! Thanks...I look forward to it!
Besides this, have you tried the lib? Is it working for you?
I'd love to hear from you, also about your setup for backups.
The lib? Not sure what that is...is it a precompiled way to run borgjs?
I installed Borgjs on an Unraid server using the command: npm i -g borgjs
I have not had it run successfully yet though...When I tried it yesterday it errors out with an error about the lock file and another instance of Borgjs running.
As for Borg, I am using the Borg precomplied linux 64 file on 2 unraid servers...primary and backup.
Nightly, I call a script that I wrote which calls borg and pushes all my backup archives via ssh from my primary server to my backup.
Idealy, there would be a way to run Borgjs the same way I run the Borg binary...precompiled executable file for Linux...
I love your idea of using a config file to pass the info to your script...rather than borgmatic (https://torsion.org/borgmatic/), because I can keep that backed up an available on any machine...
which version of borgjs are you running? I fixed a couple issues related to the file locking system.
Can you please check if you are running the latest?
I was running the previous version...
Give me a few and I will let you know.
The latest version works...no file lock error like before...However it will not use my current cache location which I have declared with an environment variable...so it will have to rebuild cache which is what I am trying to avoid.
If it's set in aa env variable, borg should use it. A quick way to solve is to set the env variable while running the script
$ YOUR_ENV_VARIABLE=value borgjs -c ~/config.js
passing the cache environment variable seems to have worked that way...thanks!
It still woudl be nice to pass it through with the config file though...
I also need to be able to add the flag ignore inodes...
I pass that flag in my script so it does not add all files again in an archive...borg seems to need this flag when I backup to my remote server...
Sounds like a lot of work to make those changes to your script..
If you have the time and desire that would be awesome, but I completely understand if you do not see the value.
Thank you!
I see the value of what you proposed. My tool is meant to enable people to use borg with ease, but it should not prevent customization.
Your idea of allowing borg flags to pass through the config file is valid. I will think about a sane way to implement this, and keep you posted in this thread.
Thanks for the feedback
Understood...
Thank you for looking into being able to cusomize the options of your script!
I look forward to what you are able to make happen.
Thanks!
Release 2.0.0 has been shipped. It supports custom environment variables and custom arbitrary borg options.
npm i -g borgjs
Please see the readme, you will have to adapt the config file. let me know how it goes
Awesome job!!!
Tested it out and all env variables and options pass through correctly!
Thanks a lot...this will greatly simplify my back up script.
I really appreciate your work!!
Thanks again
Cheers