My NAS sends me a report every morning, and it's caught multiple problems before they turned into data loss
Catch errors while there's time
The user uses their Network Attached Storage (NAS) for document storage, backups, and running a Jellyfin library. To monitor the NAS without constantly checking the dashboard, they created a Python script that runs as a scheduled task on the NAS. This script sends a concise report every morning via email.
The script gathers drive health data using smartctl, checks available storage space, and reads backup logs. It compares current readings with previous ones and identifies any drives affected by issues. Additionally, it displays the backup's latest job result, when the last backup completed successfully, the available NAS space, and the backup destination's space remaining.
The script ensures that an incomplete or inaccurate check is avoided by reporting unavailable information when it cannot read a drive or retrieve backup results.
One issue caught by the report was an overnight backup that stopped completing. The email provided a failed job timestamp and the timestamp of the last successful run. It was discovered that the NAS had sufficient storage, and the older backups were still intact. The problem was with any new or modified files since the last successful backup, as they were not receiving the separate copies intended.
The user backs up their NAS to a cloud service called Backblaze, which they find easier to manage than using another external drive for backups. They also acknowledge that while pending sector count increases do not guarantee a drive failure, they are worth investigating, especially when noted alongside the overall SMART status. The morning email serves as a supplement to the real-time storage notifications, ensuring that users are aware of any urgent faults or drive failures promptly.
Written by urgent.news from XDA Developers's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.