Updates to a couple of my FreeNAS scripts

I have updated a couple of the scripts mentioned earlier that I use on FreeNAS. Originally I intended to bundle them together but reconsidered and now feel they are better off available separately. So here is basically a brief of the changes and what would have been a common README.

If there is actually anyone using the script to back up the configuration via email you really should read on and then update to this version! This new version sends the configuration as an attached and compressed file instead of inline in the email. It also encrypts the file with the first line of a specified file as the password using AES-256. Some information about the configuration is also included in the new emails, more specifically last modified time, size and a SHA-256 checksum of the attachment to make sure it has gotten through properly.

The changes to the zpool script is more subtle and does not introduce any new features, but cleans it up a bit and uses a method that should have been in the original script but that somehow was lost.

Both of the scripts are intended to be used via cron, and both have all configuration within. With the only exception being the actual encryption key for the backup of the configuration database. I recommend using a static file for this unless you are certain that you will know what was on the first line at the time of encryption. If not the backed up database will be a bit useless. Both the scripts also have no dependencies that require anything else then a stock installation of FreeNAS so they really should work in most settings.

Get the scripts here:
v0.0.5_zfs-status.sh
SHA256 57ccc575112beab813ce775c688a4d454136c3ac7e5e9c7e1fb49bd2813762e0

v0.2_mailconfig.sh
SHA256 af7e34b179acb2de568448a839cb80c0e4291d8de4a4e2d5fafc75ab6880d4ca

The scripts are provided as is and without any warranty. If they break something I accept no responsibility but will gladly look into any bugs or ideas that I’m made aware of.

If you like them, use them or have any feedback please let me know!

Share

Leave a Reply

Your email address will not be published. Required fields are marked *