ICloud – How to back up iCloud Calendars/Reminders/Contacts

automationbackupicloud

I use iCloud for my calendars/contacts/reminders because it's just so convenient to share all the data instantly between all my devices, but I can't help worrying about what would happen if Apple's servers have a brain-fart. So I'd like to make my own backups. And, of course, I'd like those backups to happen completely automatically, with no human intervention at all, because I'm sure you all know that manual backups are backups that just stop happening.

Ideally the code for making these backups would run on the Linux machine that is responsible for all my other backups, and I'm happy to write the code to do this myself.

My question is … can anyone point me at documentation for the protocols and APIs that Apple's applications use?

Best Answer

No API. No protocol.

But there are three workarounds I can think of. The first is to use your mac and copy the following files manually (or rsync in combination with cron or something else you like).

  • Mail data and settings ~/Library/Mail/V2
  • Contacts data and settings ~/Library/Application Support/AddressBook
  • Calendar data and settings ~/Library/Calendars/
  • Safari data and settings ~/Library/Safari/
  • Keychain data and settings ~/Library/Keychains/

(for sake, just copy the whole 'Library' folder ;) (list taken from http://support.apple.com/kb/PH13985)

An other way to do it is to setup your linux backup machine to fetch the mail, contacts and calendar and backup that like you normally would.

  • email through IMAP (http://support.apple.com/kb/HT4864)
  • calendar through WebDAV (it is likely that this must be a public url)
  • contact, no clue. For android it is possible but I have not seen a Linux solution.

Yet another way is to install 'iCloud Control Panel' through Wine and handle your files from there, although it might work like garbage (https://appdb.winehq.org/objectManager.php?sClass=application&iId=14545)

A virtual machine running OS X on your linux server might also do. But I do not know if it is legit to talk about that on stack exchange.

Edit: see comments for ical and contacts