-
Store
backup.sh
somewhere and make it executable:$ vim ~/Music/OP-Z/Backups/Support/backup.sh
(The file
opz_backup.sh
is only needed as a convenience shortut to manually run the backup) -
Store
local.opzbackup.plist
at~/Library/LaunchAgents
:$ vim ~/Library/LaunchAgents/local.opzbackup.plist
Update the keys
SOURCE
,TARGET
,Program
,StandardOutPath
andStandardErrorPath
to match your desired locations. -
Open System Preferences → Privacy → Full Disk Access and add your
sh
binary to the list (/bin/sh
) or if it is already there, enable the checkbox. -
Load the launch agent:
$ launchctl load ~/Library/LaunchAgents/local.opzbackup.plist
Backups should now be automatically performed when connecting the OP-Z as a mounted disk (by connecting it over USB and pressing and holding the track button Ⓘ while turning the device on).