automate rsync in Lion..?

Discussion in 'Mac Programming' started by soultruth, Sep 28, 2016.

  1. soultruth macrumors newbie

    Joined:
    Sep 28, 2016
    #1
    Hi there, first time post and new to the forum. Hope this is in the right place - apologies if not!

    I have a friend with an old iMac 2006 or 2007. Its running Lion. Cant update to anything newer.

    He requires a backup but Time Machine is failing every time. We're using a new 1TB USB drive but it takes days then fails.

    I've written a simple bash script to run rsync and copy all the folders he requires to the drive. This does work, but I need a way to automate it. It tried to use Automator but it doesn't like Lion.

    Any advice would be very gratefully received.

    Thanks!
    Ray
     
  2. freiheit macrumors 6502a

    Joined:
    Jul 20, 2004
    Location:
    California
    #3
    I concur. In this day, launchd seems to be the way to go. It can be somewhat daunting to get started with it, but there are good tutorials and examples online, and honestly if you're comfortable writing an rsync script you can handle launchd (speaking from experience here :) ).
     
  3. ocabj macrumors 6502a

    ocabj

    Joined:
    Jul 2, 2009
  4. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #5
    Cron will work, but is the old school way of doing things. Whilst it does still work and I don't know if it's officially deprecated, Apple seem to be encouraging everyone in the direction of launchd.

    If you do decide to use Cron, despite this, then you might want to take a look at Cronnix which provides a GUI, making things a little easier: https://code.google.com/archive/p/cronnix/downloads

    Seriously though, launchd is the way to go.

    In case it's of some help, I've attached a copy of a launch daemon I use to do folder synching myself. It shouldn't be too hard to alter it to suit your purposes.
     

    Attached Files:

Share This Page