Thursday, February 21, 2013

How I Couldn't Recover Deleted Videos & an iMovie Project from iPhone Backups

I finally downloaded iMovie and started editing some video on my phone. I usually don't have time to sit down at my iMac for an editing session, but I do usually want to string a few clips together with titles. iMovie iOS seems to work well for that.
There is, however, a catch. Somehow I got the notion that iMovie copied clips into itself, not used them directly from the Photo roll. When I went to export to the Photo roll, I was out of space on my 16 GB iPhone. So I deleted the source video clips and boom, iMovie could no longer find the videos, prompting this:
Since the first iPhone in 2007, I've never accidentally deleted a video or photo. I've also been meticulous about backups. Since iCloud backups and Photo Stream in iOS 5, I am syncing photos and videos manually less and less frequently to the iMac. When I tweeted the above, I had no idea I would totally fail to get both the videos and iMovie project back together. Here's what happened.
Plan A
The plan seems simple, restore from backup right? iCloud makes this super easy. Here's what I had to work with:
  • iPhone 5 with iMovie project but no videos
  • iCloud backup with videos but no iMovie project
If iOS had Time Machine, or even Trash of some kind, this would have been really simple and I hope iOS 7 has something more granular than full device restore. Heck, even if videos were added to Photo Stream I wouldn't have had a problem. But we aren't there yet. I thought I'd:
  1. Restore iCloud backup onto an iPhone 4
  2. Email video clips to myself to get them onto iPhone 5
  3. Sync clips to iMac just in case something else goes wrong
  4. Finished exported from iMovie
This immediately goes wrong when I restored an iPhone 5 backup onto the iPhone 4.
iOS Won't Restore Photos & Videos from an iPhone 5 backup to iPhone 4
I've done a decent number of iCloud restores to move devices around amongst family members. It works great, I've never seen it fail. So at first when I restored the iPhone 4 from iPhone 5 and there were no videos, I thought it was either just taking a while to copy all the data back or for the first time it had simply failed.
So what do you in tech do if something doesn't work the first time? Like Sisyphus you do it again, and I did. Another round through restoring the device to factory and restoring from iCloud ended with the same result. I babysat it this time, and saw an alert like some items could not be restored blah blah blah. I was too annoyed to record the entire message and had sussed out what was happening. I had thought this might be a possibility because photos and videos from iPhone 5 are much higher quality, maybe even beyond the performance capabilities of the hardware. So I had to try this from a different angle.
Plan B
The only way to get the videos back was to restore from iCloud to the iPhone 5:
  1. Backup iPhone 5 using iTunes to preserve iMovie project
  2. Restore iPhone 5 from iCloud to get the videos back
  3. Extract the videos from iCloud backup
  4. Restore iPhone 5 to iTunes backup
  5. Deposit videos on iPhone 5's photo roll
  6. Hope the iMovie project isn't busted
I only got to Step 3 before blowing it. On Step 4, iTunes offers to backup the phone before restoring it. Seems like a perfectly smart and safe decision to make with one crucial exception: this backup overwrote my good backup with the iMovie project. I hesitated on the checkbox to backup before restore, knowing I shouldn't check it, but wanting the safety net in case something went wrong.
I knew I had seen iTunes offer me the choice to restore from multiple backups of the same device before, so I trusted it would be so here. It wasn't, iTunes overwrote it's last backup ending my dreams of recovering my iMovie project.
  • I could have avoided losing the iMovie project if I had added Step 0 to Plan B and synced the project to the iMac using iTunes.
  • I could have previously imported the videos to the iMac using iPhoto and avoid either Plan A or Plan B.
  • A friend suggested undelete software. I did not consider that option until after I overwrote the iPhone in Plan B.
iCloud backups are great and probably save most people from catastrophic mistakes, but I really look forward to a more granular accidental deletion recovery mechanism, hopefully in iOS 7. Actually surprised now that I'm thinking about it that one of the original Mac's great innovations, Trash, doesn't exist in some form on iOS.