Did you know you had all the software you need to perform backups already installed on your Mac?

There's Time Machine, which does well, but beyond that, usually most articles point you to expensive apps to do selective backups. What if I have this one folder I want backed up?

Given that OS X is based on a Unix backbone, there are all kinds of under-the-hood tools to use.

Here's one I've started using to back up my iCloud Drive files. Follow these steps in order to start using it yourself.

  1. Create a folder in your Home directory called "iCloud"
  2. Open TextEdit from your Applications folder. Paste the following, exactly as shown, into a new document:
    [gist]218551528b3f05fb8b07204e920e86f2[/gist]
  3. Save the file as "icloud-backup.sh" in your Home directory. Be sure to use ".sh" as the file extension, not ".txt"
  4. Open Terminal from your Applications -> Utilities folder. Type the following: chmod +x icloud-backup.sh
  5. Now type
    crontab -e
  6. In the new window, use the arrows on your keyboard to scroll down to the bottom of the file. Paste the following, exactly as shown:
    0 0 * * * ./icloud-backup.sh
  7. On your keyboard, press CTRL and O (the letter O), then the enter/return key. Then press CTRL and X. Exit Terminal.


Your computer should now sync your iCloud Drive to your computer's Home directory every hour. Only changed files will be synced.