automator application using rsync suddenly deleted many of my files and applications
Hi, I put together a very simple automator routine that syncs a shared folder on another machine with a folder located in iCloud. I run it occasionally so that I can have access to copies of the latest files in that folder from my phone, computers at home etc.
the workflow is as follows:
get specified finder items (path to folder on other computer)
set value of variable (source_folder)
-
get specified finder items (path to folder on iCloud)
set value of variable (target_folder)
-
get value of variable (source_folder)
get value of variable (target_folder)
run shell script
shell:/bin/bash
rsync -avE --delete "$1/" "$2/"
it was working fine for years, then one day a few months back when I ran the app a window popped up asking for my permission to access 'something' (can't remember exactly what, maybe documents folder?) and I just clicked allow, then another asking for another permission for something (wish I knew exactly what) then suddenly various applications shot off of the dock (making the whoosh deleted sound) and files started disappearing from my desktop. there was the spinning gear icon on the menubar, which I clicked and it said 'running script 14% complete' or something along those lines. I clicked the cancel button and everything stopped. In the aftermath iCloud login windows were popping up and finally I restarted the computer to see what would happen. It booted up as though it was a new account being created (asking for preferences for screen, Siri, etc) and had me log in to my apple account. once in, files on the desktop were still there but most applications, photo albums, videos were all reset to default (ie empty photos library and nothing else in the pictures folder). Thankfully I was able to restore with a Time Machine backup.
Anyone have any idea what happened exactly? I would like to continue to use this application but am reluctant. my only alternative is to manually copy/overwrite the folder each time which get to be a slow process when the folder gets filled with files.
Thanks,
G
Mac mini, macOS 12.6