-
Store
backup.shsomewhere and make it executable:$ vim ~/Music/OP-Z/Backups/Support/backup.sh(The file
opz_backup.shis only needed as a convenience shortut to manually run the backup) -
Store
local.opzbackup.plistat~/Library/LaunchAgents:$ vim ~/Library/LaunchAgents/local.opzbackup.plistUpdate the keys
SOURCE,TARGET,Program,StandardOutPathandStandardErrorPathto match your desired locations. -
Open System Preferences → Privacy → Full Disk Access and add your
shbinary 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).