This python package 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 requires at least python3.7.
- If you don’t already have it, download and install the latest python version.
- Download the latest release of this package.
- Install the release with pip via
python3 -m pip install snapraid-runner-x.x.tar.gz
on Linux orpy -3 -m pip install snapraid-runner-x.x.tar.gz
on Windows - Copy/rename the
snapraid-runner.conf.example
tosnapraid-runner.conf
and edit its contents. You need to at least configuresnapraid.executable
andsnapraid.config
.- The wiki has details on how to use gmail for sending mail.
- Run the script via
snapraid-runner
command on Linux or Windows.
- To uninstall simply run
python3 -m pip uninstall snapraid-runner
on Linux orpy -3 -m pip uninstall snapraid-runner
- Runs
diff
beforesync
to 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
scrub
aftersync
Snapraid-runner is supposed to be a small tool with clear focus. It should have minimal dependencies to keep installation trivial. I always welcome bugfixes and contributions, but be aware that I will not merge new features that I feel do not fit the core purpose of this tool.
I keep the PRs for features I do not plan on merging open, so if there's a feature you are missing, you can have a look at the open PRs.
- Add --ignore-deletethreshold (by exterrestris, #25)
- Add support for scrub --plan, replacing --percentage (thanks to fmoledina)
- Remove snapraid progress output. Was accidentially introduced with python3 support.
- Remove (broken) python2 support
- Fix snapraid output encoding handling (by hyyz17200, #31)
- Fix log rotation (by ptoulouse, #36)
- Add compatibility with python3 (by reed-jones)
- Add support for running
snapraid touch
(by ShoGinn, #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
To install local build to virtual environment:
python3 -m pip install build
python3 -m build
python3 -m venv venv
source venv/bin/activate
python3 -m pip install dist/snapraid-runner-x.x.tar.gz
Install from pypi:
- `python3 -m pip install snapraid_runner`` Install from release:
- download release from https://github.com/Chronial/snapraid-runner/releases
- install release:
python3 -m pip install snapraid-runner-x.x.tar.gz