Extract iOS backups with stock macOS Terminal commands
The following extracts your iOS backup files as
1. Navigate to the backup folder:
2. Look for a folder that contains a
3. This extract everything to
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 is the name of the original file.
Then search for the file in the original backup folder:
APFS
clone files (which take no disk space), gives the hashed filenames their real names and moves them into folders based on their associated domain
— making the cloned backup easily browsable in Finder.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 name_of_your_folder
3. This extract everything 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 is the name of the original file.
sqlite3 -separator ' | ' Manifest.db '.once /dev/stdout' 'select fileID,domain,relativePath from files where instr(relativePath, "name_of_file")'
Then search for the file in the original backup folder:
find original_backup_folder -name first_column_value