This script runs snapraid and sends its output to the console, a log file and via email. All this is configurable.
It can be run manually, but its main purpose is to be run via cronjob/windows scheduler.
It supports Windows, Linux and macOS and runs on both python2 and python3.
- If you don’t already have it, download and install the latest python version.
- Download the latest release of this script and extract it anywhere or clone this repository via git.
- Copy/rename the
snapraid-runner.conf.exampletosnapraid-runner.confand edit its contents. You need to at least configuresnapraid.exectableandsnapraid.config. - Run the script via
python3 snapraid-runner.pyon Linux orpy -3 snapraid-runner.pyon Windows.
- Runs
diffbeforesyncto see how many files were deleted and aborts if that number exceeds a set threshold. - Can create a size-limited rotated logfile.
- Can send notification emails after each run or only for failures.
- Can run
scrubaftersync - Can run
smart. For this to work, you need smartmontools. Most Linux distributions will have it installed installed by default.- Windows users may install using the packaged .exe installer found at this link or
use Chocolatey (i.e.,
choco install smartmontools). - Mac OS users may install using the packaged .dmg installer found at this link or
use Homebrew (i.e.,
brew install smartmontools). - Linux users may check for smartmontools using
smartctl -V, if not installed use your distribution's package manager to installsmartmontools(e.g.,apt-get install smartmontools,yum install smartmontools, etc.)
- Windows users may install using the packaged .exe installer found at this link or
use Chocolatey (i.e.,
- Add compatibility with python3 (by reed-jones)
- Add support for running
snapraid touch(by ShoGinn, PR-11) - Add SMTP TLS support
- Limit size of sent emails
- Fix compatibility with Snapraid 8.0
- Allow disabling of scrub from command line
- Initial release