Monday, May 5, 2025

Backup iPhone to External Drive

Running out of disk space for iPhone backups is a pain. It's very important to back up your iPhone. Sure, there are some options to do this, such as using iCloud. But for me, I have lots of space on my USB drives, and I'd like to use them for the job.

Finding a solution

On the current macOS (mine is Sequoia 15.3.2), there's no obvious way to change the iPhone backup location in Finder.


After searching online, I found a great solution: using a symbolic link to redirect the backup location to a different path on my external USB drive. It's a really smart trick.

Using Symbolic Links

The ln command is an old but handy command in Unix. I used it often back in university. Basically, it creates a symbolic link that points to another file or directory. It looks like a regular file but is actually a link.

Before doing anything, I needed to locate the original backup path on my Mac and ensure it didn’t contain other important files.

I quickly found the backup folder: ~/Library/Application Support/MobileSync/Backup. I opened Terminal and ran the following commands to check:

  1. MyMac-MBP13:MobileSync auser$ cd ~/Library/Application\ Support/MobileSync/
  2. MyMac-MBP13:MobileSync auser$ ls -a
  3. . .. .DS_Store Backup
  4. MyMac-MBP13:MobileSync auser$

To be safe, I decided to run a test first. As shown above, the only contents are the Backup folder and a hidden .DS_Store file (which can be ignored). So, I created a test directory backupTest in ~/Downloads/:

  1. MyMac-MBP13:MobileSync auser$ mkdir ~/Downloads/backupTest
  2. MyMac-MBP13:MobileSync auser$ ls -a -l ~/Downloads/
  3. total 316496
  4. ...
  5. drwxr-xr-x 2 auser staff 64 22 Apr 20:23 backupTest
  6. ...

Now I created a symbolic link named backupTest pointing to ~/Downloads/backupTest:

  1. MyMac-MBP13:MobileSync auser$ ln -s ~/Downloads/backupTest/ backupTest
  2. MyMac-MBP13:MobileSync auser$ ls -l
  3. total 0
  4. drwxr-xr-x 1 auser staff 26 21 Apr 20:27 Backup
  5. lrwxr-xr-x 1 auser staff 33 22 Apr 20:34 backupTest -> /Users/auser/Downloads/backupTest/

Great! The symbolic link backupTest now points to the test folder. I copied a known file (1.html) to this link and verified the result:

  1. MyMac-MBP13:MobileSync auser$ pwd
  2. /Users/auser/Library/Application Support/MobileSync
  3. MyMac-MBP13:MobileSync auser$ cp ~/Downloads/1.html backupTest
  4. MyMac-MBP13:MobileSync auser$ ls -l ~/Downloads/backupTest/
  5. total 8
  6. -rw-r--r--@ 1 auser staff 4024 22 Apr 20:43 1.html

The pwd command shows the current directory. The cp command copies the file, and the last ls confirms that it reached the redirected location.

Ready to Create the Real Link for iPhone Backup

Now I was ready to create the actual symbolic link for redirecting iPhone backups to my external USB drive. But first, I did two things:

  1. Backed up the existing Backup folder just in case.
  2. Deleted the old Backup directory (after making sure it's empty).

To remove the folder, I used this command:

  1. MyMac-MBP13:MobileSync auser$ rmdir Backup

Next, I identified the name of my external drive (MyUSBDrive) and the folder I wanted to use (iPhoneBackups).

I created the symbolic link and verified the link like this:

  1. MyMac-MBP13:MobileSync auser$ ln -s /Volumes/MyUSBDrive/iPhoneBackups/ Backup
  2. MyMac-MBP13:MobileSync auser$ ls -l
  3. total 0
  4. lrwxr-xr-x 1 auser staff 26 21 Apr 20:27 Backup -> /Volumes/Lachie160/iPhone/

Backup My iPhone

With everything set up, I connected my iPhone and USB drive to my Mac, opened Finder, and clicked the "Back Up Now" button. The backup process started smoothly.

In just 7 minutes, the backup was completed—without any "not enough disk space" error!

References

Other Blogs