Trying to set up a simple backup with Rsync and Automator

Soldato
Joined
20 Oct 2002
Posts
18,542
Location
London
This should be easier!! :(

I have a work Mac, I have a Documents folder with which I'd like to clone/sync to my corporate Onedrive location. Main reason being I get updated project (film) schedules every week and I'd like them accessible on my phone and iPad if I'm out and about. They're no good to me if they're out of date.

So, I've done a bit of re-learning of terminal and got this far;

Bash:
rsync -av ~/Documents/ /Users/mySSOhere/Library/CloudStorage/OneDrive-CompanyName/Documents-Sync
(I guess I can add the --delete flag as well but I'm not brave enough right now)

What I want to do is automate this. Preferably as-and-when files change but I'm not sure that's possible with Automator/Rsync?

If not then perhaps every time I log-on/log-off or something? It's not a huge amount of data, just some PDFs that will be mostly changing.

What do I do next to automate this? I can't get my head around any of the Automator guides.. :o Thanks.
 
Worth searching on Youtube as well as there are a few videos on Automator's Folder Action; one below mentions shell scripts around the 8:15 mark -
Ah that's a great vid thanks, even though it looks like it should have been uploaded in 1996 :p I will have a play around with it this week and report back!
 
Back
Top Bottom