On 2017-08-19, Robert Peirce <
b...@peirce-family.com> wrote:
>
> Where are [iTunes backups] stored and can they be accessed from
> outside iTunes?
iTunes mobile device backups are at:
~/Library/Application Support/MobileSync/Backup/
If you open iTunes Preferences > Devices, you can right-click any of the
backups listed there and choose Show in Finder to figure out which
folder corresponds to the backup you want.
With that said, finding the specific backup data you want will take more
effort (see below for details).
> I am particularly interested in getting some data that was backed up
> from the phone and then deleted from the phone. I want to avoid
> restoring the entire database which would affect other more recent
> information.
What sort of data, specifically?
The backup folders in this location contain a slew of files and folders
with obfuscated names. But there is a particular file named "Manifest"
SQLite database containing a list of all files in the backup. You can
dump this database to a CSV file in a terminal window after changing the
working directory to the database folder (like ~/Library/Application
Support/MobileSync/Backup/1f825e0c3462e509ba39cd35d90feb81a824fd14/)
like so:
# sqlite3 Manifest.db
SQLite version 3.8.10.2 2015-05-20 18:17:19
Enter ".help" for usage hints.
sqlite> .tables
Files Properties
sqlite> .mode csv
sqlite> .output Manifest.csv
sqlite> select * from Files;
sqlite> .exit
After issuing these commands, you will see a new Manifest.csv file in
the same folder as the Manifest.db file. You can open this CSV file with
any plain text editor or spreadsheet program to view its contents.
Inside the CSV output, there is one line for each file in the backup in
this comma-separated format:
992df473bbb9e132f4b3b6e4d33f72171e97bc7a,HomeDomain,Library/Voicemail/voicemail.db,1,"bplist00.........."
Each column of information is separated by a comma on the line above.
The first column contains the obfuscated name of the voicemail database
file in the backup: 992df473bbb9e132f4b3b6e4d33f72171e97bc7a.
The second column contains the domain identifier of the voicemail
database file: HomeDomain.
The third column contains the unobfuscated relative path and name of the
voice mail database file: Library/Voicemail/voicemail.db.
The obfuscated filename is a simple SHA1 hash of the domain identifier
and the pathname. So you can easily calculate the obfuscated names
yourself if you know the domain and pathname, like so:
# php -r '$h = hash ("SHA1", "HomeDomain-Library/Voicemail/voicemail.db");
print "$h\n";'
992df473bbb9e132f4b3b6e4d33f72171e97bc7a
Depending on what data you want, you'll need to scan the manifest list,
find the file you want, get the obfuscated name from the same line, and
then find the obfuscated filename within the backup folder.
For the above example, this was as simple as issuing a 'find' terminal
command within the backup folder:
# find . -name 992df473bbb9e132f4b3b6e4d33f72171e97bc7a
./99/992df473bbb9e132f4b3b6e4d33f72171e97bc7a
I often use this method in automated command-line scripts to permanently
archive content (voice mail recordings and so on) from my iTunes
backups.
Hope this helps.
--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.
JR