- Clone this repository:
git clone https://github.com/Dfernandes9/macos-backup-automation-kit.git
cd macos-backup-automation-kit- Copy the sample configuration file and edit it:
cp config.sample.json config.json
nano config.json- Make scripts executable:
chmod +x time_machine_backup.sh icloud_consolidate.sh imazing_backup.sh verify_backup.sh run_backup.sh- Run the backup pipeline:
./run_backup.sh config.jsontime_machine_backup.shusestmutilto enable Time Machine and start a backup.icloud_consolidate.shconsolidates iCloud Drive to a local directory using rsync.imazing_backup.shruns iMazing CLI backups for connected devices.verify_backup.shchecks that the backups exist.
- Edit
com.macos.backupautomation.plistto set the correct paths and copy it to~/Library/LaunchAgents/. - Load the agent:
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.macos.backupautomation.plist
launchctl kickstart -k gui/$(id -u)/com.macos.backupautomation- Time Machine: ensure the destination volume is writable and has enough space.
- iCloud consolidation: only downloaded files are copied. Make sure the files are local in Finder before running.
- iMazing CLI not found: install iMazing and ensure the CLI is in your PATH.
- Permissions: use
chmod +xon scripts; ensure you have read/write access to backup destinations. - launchd not running: use
launchctl list | grep backupautomationto see status and reload the agent if necessary.
- Use Time Machine UI or Finder to restore files from your Time Machine backups.
- To restore iCloud data, copy files from the iCloud backup destination back to
~/Library/Mobile Documents/com~apple~CloudDocs. - To restore iMazing backups, open iMazing and restore from the specified backup directory.
This automation kit combines traditional Time Machine backups with consolidation of iCloud Drive and iOS backups. It's direct, simple and ready for future expansion.