SOLVED Emailing the config file to self: guidance needed.

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Hi
I wanted to make sure I email the config file to myself weekly, 'just in case', and so I have been looking at scripts that could guarantee I do this via automation. Through forum search I found this excellent post by @Bidule0hm, but I note it's 7 years old now and I fear the way TrueNAS has evolved since might render it unusable in 2022 and beyond? It points to a script here, on Pastebin.

Assuming the script is still perfectly good, can I ask for a guide on how to use it, since I am a BSD/Linux cli neophyte. Specifically:
  • Where should I save it?
  • Should I change it's permissions and how/to what?
  • What's the best way to fire it off weekly? I assume a cron job (never having set one and not knowing what that actually involves).
Basically a bit of hand holding would be excellent - thank you!

Lastly, I assume this will give a config with no password in it. Note that the NAS contains one locked pool whose password is naturally different to the root log-on password. Is that an issue when it comes to reinstating a config, providing I remember both passwords?

Thank you!
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
  • Where should I save it?
  • Should I change it's permissions and how/to what?
  • What's the best way to fire it off weekly? I assume a cron job (never having set one and not knowing what that actually involves).
Did you read the Script basics section at the end of the @Bidule0hm post you listed?

There's an updated version of @Bidule0hm's scripts at https://github.com/Spearfoot/FreeNAS-scripts by forum member and frequent poster @Spearfoot that includes that for config.
 
Last edited:

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Did you read the Script basics section at the end of the @Bidule0hm post you listed?

There's an updated version of @Bidule0hm's scripts at https://github.com/Spearfoot/FreeNAS-scripts by forum member and frequent poster @Spearfoot that includes that for config.
No! Exhibiting my best reflex action, I diverted off at the Send config backup to email section and read no further (no earlier either actually, just focusing on the part I was interested in. How incredibly impressive of @Bidule0hm that he covered all bases. Bravo!

Thank you Redcoat for truffling out an updated version of the script from @Spearfoot too. Another 'Bravo' is surely due to Spearfoot too!

Thank you so much for your help in wrapping this up Redcoat!! Much appreciated, as always :)
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
The reason I knew that Script basics section was there is that it's been my "goto quickref" source ever since I first saw it.

Knowing very well how truffles are found, I'm not quite certain how I should react to your characterization of my @Spearfoot link contribution ... :smile: ... but "you're welcome".
 
Last edited:

NumberSix

Contributor
Joined
Apr 9, 2021
Messages
188
Knowing very well how truffles are found, I'm not quite certain how I should react to your characterization of my @Spearfoot link contribution ... :smile: ... but "you're welcome".
These are metaphoric truffles I assure you! I was thinking of small, valuable treasures. Certainly no offence intended!!
 
Top