How To Move Your iOS Backups to a Different Drive

| MGG Answers

Question:

Joe Writes: I have installed a 120GB SSD in my MacBook Pro and used MCE Tech’s OptiBay to replace my optical drive with a 500GB HDD. Due to the SSD’s relatively small size, I’m looking for ways to move as much as possible from the SSD to the HDD.  I’ve moved all the basics (i.e., iTunes and iPhoto libraries), but I’d like to move my iOS Mobile Backups folder as well.  Can you help me perform the steps necessary to do this?


Answer:

The steps to move your iOS Mobile Backups Folder to a second drive are as follows:

  1. Quit iTunes and disconnect any iOS devices from your computer (you don’t want it syncing and backing up while you’re making these changes!)
  2. Copy your ~/Library/Application Support/MobileSync/Backup folder to your target drive
  3. Check the target drive to make sure that the folder copied successfully
  4. Delete the original “Backup” folder on the main drive by dragging it to the Trash
  5. Create a Symbolic Link from the old location to the new location of the backup folder. This requires the Terminal unless you have a 3rd party utility to create Symbolic Links. Think of SymLinks as aliases, because they’re almost the same, but the system sees them differently (and that distinction is important for this purpose; check out this Mac OS X Hints article for a deeper discussion on SymLinks). If your new location is on the root level of a drive named “My Stuff”, then the command would be:
ln -s "/Volumes/My Stuff/Backup" "$HOME/Library/Application Support/MobileSync/Backup"

That’s it! Go ahead and launch iTunes and you should be good to go!

This question was originally answered on MGG 313: Shared Disks, Bad Sounds, Stealth Mode, MobileMe, and More

About MGG Answers:

Each week Dave Hamilton and John F. Braun provide some great troubleshooting advice to listeners of the Mac Geek Gab podcast. Here with MGG Answers we share some of those tips with the rest of the world!

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Comments

mlvezie

I’m afraid it’s not quite that simple. The problem is that ~ is a kind of wildcard character, like * or ?. It will change to your home directory, but not if it’s inside quotes.

As with most UNIX commands, there are different ways to solve it. Probably the easiest change is to change ~ to $HOME, as in:

ln -s “/Volumes/My Stuff/Backup” “$HOME/Library/Application Support/MobileSync/Backup”

But a reminder here that you need to use double quotes, not single quotes.

I’ll give other options, if there is interest. But this is probably the easiest and most reliable solution.

Dave Hamilton

I?m afraid it?s not quite that simple. The problem is that ~ is a kind of wildcard character, like * or ?. It will change to your home directory, but not if it?s inside quotes.


Excellent point, Michael, and you’re absolutely right. Updating the article now. Thank you very much!

And for what it’s worth $HOME works equally as well (for me, at least) outside of quotes, too, so perhaps a safer bet to use than ~ going forward. As you pointed out, though, single-quotes break it entirely.

Christopher Raymond

Would this option work

ln -?afp://myserver.com/My Stuff/Backup? ?$HOME/Library/Application Support/MobileSync/Backup? 

... or is there another way to accomplish that?

I’m looking something like that so my backups still occur so long as my server is reachable.

Christopher Raymond

Is there a way I could accomplish the same thing using an afp:// destination?

Dave Hamilton

ln?-s??afp://myserver.com/My?Stuff/Backup???$HOME/Library/Application?Support/MobileSync/Backup??
... or is there another way to accomplish that?

Good clarifying question, Christopher, as this is what I discussed doing in the show (though didn’t go through the nitty gritty).

What I do is first mount the AFP drive using normal methods (Connect to Server or simply through the finder, etc). Once your AFP drive named “My Stuff” is mounted it will (usually) live at:

/Volumes/My Stuff/

Then you would simply point your ln command there, as in

ln -?/Volumes/My Stuff/Backup? ?$HOME/Library/Application Support/MobileSync/Backup

If doing this, I also suggest setting the AFP volume to auto mount at boot. Again there are a variety of ways to do this, my favorite being to simply add it to my account’s Login Items list in the Accounts Preference Pane.

That should do it for you.

Log-in to comment