I want to run an rsync command each day or more often to back up a raspbery pi on my network to a drive attached to my mac. I see launchd, but I'm very confused about how to get it to work, and I would also like to be able to see that the script has been run, like how with time machine you can see when the last backup occurred, so I can check on it.

This is the command I want to run: rsync -avz -e ssh pi@ /Volumes/PiBackup/Rsync

Any help would be much appreciated. Ill take any methodology as well, cron, launchd, applescript, whatever works well.

  • I regularly use rsync on both platforms, but there are some things that OS X "refuses" to see. See raspberrypi.stackexchange.com/questions/42950/… for a similar discussion. You would be better using a drive on the Pi (or another Linux machine). – Milliways Mar 5 '16 at 7:32
  • Thanks for letting me know that! I wanted it to go to a drive on my Mac so it would be backed up to the cloud with backblaze for redundancy, but I may also use a small thumb drive on the pi. – Ubermaan Mar 6 '16 at 6:51

You can use Automator to create a "Calendar Event". You can use the Utilities > Run Shell Script action to run your desired script, and then use Utilities > Display Notification to show that the script ran.

When you save the workflow, it will show a dialog asking you to name the event, and will then automatically place an event in the calendar and act accordingly. You can then change that event's time and repeat frequency.

  • Thanks, that seems to work. I have an issue though, which is automator returns an error on run. The rsync can't access all files on the pi due to permissions issues, so the script runs, but with errors returned. Is there a way to continue the automator workflow even if the script returns an error? – Ubermaan Mar 6 '16 at 7:36

You must log in to answer this question.

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