MacOS – Syncing files not in Desktop / Documents via iCloud

backupicloudmacos

I have a folder containing scripts and files they operate on in a root folder /data. I would like to have them automatically backed-up as they get updated but I can't move them out of /data, as that's the folder most scripts use to locate their files. Is there a way to do this?

I use macOS Sierra Version 10.12.4. Thanks!

Best Answer

I've come up with two solutions:

  1. Using Google's Backup-and-Sync app, which allows you to select which folders to automatically sync with Google Drive (this doesn't use iCloud through)
  2. Using cron, a MacOS / Linux command-line program, to automatically rsync your directory outside of iCloud path and its copy in the iCloud folder.
Related Question