Skip to content

v3.4 - Smells like SnapRAID Spirit

Latest

Choose a tag to compare

@auanasgheps auanasgheps released this 29 Mar 12:11
· 4 commits to master since this release
6fbf1f7

Version 3.4

Finally, version 3.4 is here! This is a major update that brings a lot of long-awaited features and improvements, especially regarding notifications, security, and overall system compatibility.

A big thank you to everyone who contributed for this release!

Major Changes

Apprise Integration

The biggest addition in this release is the support for Apprise. This utility allows the script to send notifications to over 100 services (Telegram, Discord, Slack, etc.) much more reliably than before.

  • Multi-target notifications: You can now target multiple services at the same time.

  • Enhanced Reports: You can attach the full report in case of failures for services that support it, like Telegram and Discord.

  • Apprise Email: You can now use Apprise to send email reports, providing a great alternative to avoid mailx incompatibility issues.

  • Automatic Installation: The script manages Apprise installation via pipx to ensure you have the latest version without conflicting with your system's python environment.

  • Notification services deprecation: since Apprise provides better functionality and reliability, I am deprecating support for:

    • Stand-alone Telegram and Discord.
    • Custom Notification Hook.

    Please make the switch to Apprise. Deprecated services will keep working but I will not be maintaining them any more, and eventually remove them in the future.

Improved Script Robustness & Elevation

To make the script more reliable and easier to use, several foundational changes have been made to how it handles permissions and arguments:

  • Centralized Root Elevation: The script now features a one-time, centralized root elevation logic. If it’s not run as root, it will automatically attempt to elevate itself using sudo, ensuring all operations have the necessary permissions without requiring you to remember to type sudo every time.

  • Advanced Argument Handling: Added proper command-line argument parsing. You can now use --config <path> to specify a custom configuration file or --force-sync to bypass thresholds directly from the CLI.

  • Logic & Security Checks: Many under-the-hood logic and security checks have been added to prevent common points of failure and ensure the script behaves predictably in various environments.

Configuration Changes

  • New Extension: Following user suggestions, the configuration file extension has been changed from .sh to .conf.

  • New Config Required: As this release introduces several new variables, you will need to move your preferences over to the new script-config.conf file.

New Features

  • Ignore Files: You can now decrease counts by ignoring specific files based on their path. This is great for preventing frequently changing files from breaching your thresholds. This ignore logic only applies to the script count system, not to SnapRAID.

  • Sync Integrity Check: The script now includes a check using snapraid status to ensure that the previous SnapRAID sync completed successfully before proceeding with a new job.

  • Custom Hook Timing: Added an option to execute the last custom hook before spinning down drives.

Improvements & Fixes

  • Better Binary Detection: SnapRAID is now located using the system PATH instead of hardcoded values.

  • OMV7 Support: Improved the logic for discovering SnapRAID configuration files on OpenMediaVault 7 and later.

  • Large Count Handling: Fixed an issue where very large file counts in diff were not being parsed correctly.

  • Mail Handling: Improved mailx version detection and added a fallback to sendmail if an incompatible version of mailx is detected. I still recommend using Apprise in this scenario.

  • UTF-8 Support: Set the email character set to UTF-8 to ensure special characters are displayed correctly.

  • Filename Spaces: Fixed handling of spaces in filenames within the SnapRAID configuration.


What's Changed

New Contributors

Full Changelog: v3.3.2...v3.4