1

I am backing up my notebook running Arch and my girlfriend's MacBook regularly using rsync and cron / launchctl via ssh. The target is a FreeNAS server.

I would like to monitor whether the automatic jobs are running correctly, by receiving a notification if the content of the backup folders did not change for a certain time. How can I do that? Or is there some other approach usually used to verify that automatic jobs are running?

2
  • 1
    Couple of ideas. Your cron job that runs the backup can email upon success and/or failure. You could set a cron job on the NAS that looks at the backup file tree and emails if it does not see anything newer than n days old (find /backups/ -mtime [...] || echo "" | mail -s "no backups on $(date)" [email protected])
    – DopeGhoti
    Commented Mar 11, 2017 at 16:19
  • In principle a nice idea and exactly what I asked for. Didn't know about the mtime switch. However, executing the command takes ages when I search the whole backup directory. Maybe it suffices if I just look at the change time in certain folders like /var/tmp. Anyway, I will have a look into that.
    – BayerSe
    Commented Mar 11, 2017 at 17:48

1 Answer 1

1

The content of the backup not changing as a symptom of the backup not running? In that case monitor the cronjob with a dedicated cron monitor such as WDT.io. This recipe's example is specifically about backups and shows you how to do it.

2
  • Nice idea. I'm not too comfortable, though, with using an external service (any security concerns, etc?). I will think and read about it, thanks for the idea!
    – BayerSe
    Commented Mar 11, 2017 at 17:50
  • 1
    After some evaluation it seems as if a cronjob monitoring serves me better than monitoring the file changes. Thanks again for the suggestion.
    – BayerSe
    Commented Mar 12, 2017 at 17:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .