← All guides

Guide · Backup

Monitor Synology Hyper Backup (DSM)

Hyper Backup can email you when a job fails, but if the NAS reboots into a bad state, DSM's scheduler stalls, or the task just stops firing, there's no failure to email about. A Task Scheduler check-in closes that gap: no check-in, you get paged.

1. Create a check

Create a check in Mortemain with a schedule and grace period matching your Hyper Backup task, for example daily at 01:00 with a 90 minute grace covering its normal run time. Copy the ping URL, DSM already ships curl, so nothing extra needs installing.

2. Schedule the check-in in Task Scheduler

Open Control Panel → Task Scheduler → Create → Scheduled Task → User-defined script. On the Schedule tab, set it to run shortly after the backup window closes (if the job starts at 01:00 and usually finishes inside the hour, schedule this for 02:00). On the Task Settings tab, paste:

 Task Settings → Run command
curl -fsS -m 10 --retry 3 https://ping.mortemain.com/your-check-uuid

Run the task as root if step 3 needs to read DSM's logs. On its own this baseline version only proves DSM and the scheduler are alive, not that the backup itself succeeded, step 3 fixes that.

3. Gate on the actual result (recommended)

Hyper Backup doesn't expose a post-job script hook, so pull the result instead of waiting for it to be pushed. Every run leaves a line in DSM's backup log (Log Center → Backup), matched here by task name:

 /usr/local/bin/hyperbackup-ping.sh
#!/bin/sh
URL="https://ping.mortemain.com/your-check-uuid"
TASK="Nightly Hyper Backup"
LINE=$(grep "$TASK" /var/log/synolog/synobackup.log | tail -n 1)

case "$LINE" in
  *"completed successfully"*) curl -fsS -m 10 --retry 3 "$URL" ;;
  *) curl -fsS -m 10 --retry 3 "$URL/fail" ;;
esac

Adjust the match string to whatever wording your DSM version actually logs for a successful run, check Log Center once to see it. No logs worth parsing? A lighter option: watch the modified time of a file inside your backup destination's repository folder instead, Hyper Backup touches it on every completed version, so a stale mtime past your grace window is as good as a failure.

4. Track run duration (optional)

Add a second, earlier Task Scheduler entry that fires at the backup's start time and pings /start. Mortemain then reports how long each run actually took, useful for catching a backup that's quietly getting slower long before it blows through its window:

 Task Settings → Run command (second task, at 01:00)
curl -fsS -m 10 https://ping.mortemain.com/your-check-uuid/start

Test it

Run the script by hand from a DSM SSH session first, the check flips to up immediately. Then let the scheduled task fire on its own overnight, and finally disable the Hyper Backup task's schedule for a night to confirm the down alert lands after the grace window, exactly what Hyper Backup's own notifications can't tell you.

Testing by hand needs SSH enabled under Control Panel → Terminal & SNMP, the scheduled task itself runs fine without it.