Note: This applies ONLY for iCloud's "Documents in the Cloud." This post doesn't involve any other iCloud services, including iCloud backups, contact sync, email, or anything else other than document syncing. In fact, iCloud backup and restore is pretty amazing.

The problem first began in August, when a Byword for iOS update caused my iPhone to stop syncing documents to my iPad and Mac.

After a lengthy back and forth with Byword support, they suggested terminal commands to reset iCloud on my Mac. I tried it this weekend, and not only did that not fix the problem, it wiped all of my iCloud documents, including those on my iPad. I was left with no copies and no backups, other than a cloned drive I had made before installing Mountain Lion.

The worst part? My iPhone still wouldn't sync documents.

I've accepted that those documents are gone. Fortunately, it wasn't anything major, but I'll be damned if it's going to happen again.

You won't lose data, but you will lose stored wifi passwords,alarms, email signatures, and your wallpapers. The upside is that my iPhone 4 is much faster after doing this. I must've had a lot of cruft in there.

Backup Your iCloud Documents on the Mac

If you're syncing documents in an iOS app to a corresponding Mac app (iA Writer, Numbers, Byword), then Time Machine is a must.

The good news is that Time Machine is dead easy to set up. You'll need a portable hard drive (the model I use; buy from this link to support the site), or if you're fancy, you can buy a Time Capsule.

Plug in your drive, or connect to the Time Capsule. A popup will ask if you want to use it for Time Machine. Say yes, and that's it. Just wait for the initial backup to finish, which could take a while.

To recover a deleted iCloud document from Time Machine, connect to your Time Machine drive, open the app in question, and then click the "iCloud" tab in the file selection dialog.

Once you're looking at your iCloud documents, click on the Time Machine icon in the menubar. It looks like a clock. The file dialog will be shot into outer space, and from that cold vacuum, you can flip through previous versions of your iCloud documents.

Click the file you want to resurrect, click "Restore," and you have your file back.

Activate Time Machine while viewing your iCloud documents to see previous versions.

Only in the cold, dead vacuum of space can you recover your iCloud files.

iCloud Documents and Windows

My advice for Windows users is to avoid using iCloud documents entirely. Most apps that offer iCloud file storage also offer Dropbox, which is the better route to go. However, iWork for iOS lacks Dropbox support, so if you use that, then copy your work out via iTunes file sync on a regular basis.

What Apple Needs to Do

The current implementation of iCloud is very unforgiving when it comes to file deletion, and I doubt Apple wants "unforgiving" to describe any of their products. In my case, because local copies were deleted from my Mac, they were also deleted from my iPad. A trash can or some sort of undelete is essential.

There is also a lot of developer confusion about how iCloud works. I considered switching away from Byword entirely, but several users of competing product iA Writer have complained of data loss after an app update. There is something clearly wrong with how Apple is communicating iCloud to developers.

The entire point of iCloud documents is to develop an idiot-proof file system. Unfortunately, Apple isn't quite there yet.