How to: back up your iPhone with rsync
iTunes hates me:
A couple of weeks ago, iTunes decided to stop talking to my iPhone. For some reason, iTunes on my computer decided that my phone wasn’t authorized to use my iTunes Store account.
My phone thought it was legit… Everything continued to work on that end. My computer thought it was cool. But somewhere in the connection between the phone and computer, iTunes decided that it would be best to wipe my phone. Which it continued to offer to do every time I tried to sync.
No me gusta.
So I’m taking drastic measures:
Since iTunes is being lame, it won’t let me back anything up. Luckily, my friend
rsync never fails me.
- Use rsync to back everything up.
- Let iTunes do its wipey/restorey thing.
- Recover the stuff I care about via reverse rsync.
Because I always forget how to do things:
Here’s how to use
rsync to back up your iPhone… This process requires a “liberated” phone, with OpenSSH installed (and turned on). But that whole process is beyond the scope of this post.
rsync all the important stuff off your phone, make sure your phone is on, SSH is running, and everything is connected to the same network. Then open Terminal, change to an appropriate directory, and type this:
rsync -avz --stats --progress --exclude "private/var/mobile/Media/iTunes_Control/Music" root@YOUR_PHONE_NAME.local:/ ./backup
Of course, you’ve gotta replace YOUR_PHONE_NAME with the actual name of your phone…
It will ask for your phone’s root password. If you haven’t changed it, this is probably “alpine”. Also, shame on you.