Extract iOS backups using stock macOS Terminal commands only
Extracts your iOS backup files as APFS clone files (which take zero storage space), gives the hashed filenames their real names and moves them into folders based on their associated domain, making everything easily browsable in Finder.
1. Navigate to the backup folder:
1. Navigate to the backup folder:
cd ~/Library/Application\ Support/MobileSync/Backup/
2. Look for a folder that contains a Manifest.db
file and lots of 2-character subfolders and then run:
cd FOLDER_NAME
3. The following command extracts all the backup files to ~/Desktop/ios_backup
, except the files you can access from Files app — if you want to extract those as well, leave out ` | grep -v "File Provider Storage" `
before ` | sh `
at the end:
sqlite3 Manifest.db '.mode list' '.once /dev/stdout' 'select "find . -name " || fileID || " | xargs -I{} ditto --clone {} ~/""Desktop/ios_backup/'${PWD##*/}'/" || domain || "/" || relativePath || """" from files' | grep -v "File Provider Storage" | sh
If you want to find the original version of a specific file, run the following command and examine the output to verify you have the right file. The first column contains the name of the original file.
sqlite3 -separator ' | ' Manifest.db '.once /dev/stdout' 'select fileID,domain,relativePath from files where instr(relativePath, "FILENAME")'
Then search for the file in the original backup folder:
find OG_BACKUP_DIR -name COL_VALUE