Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

iPhone backups in iTunes

188 views
Skip to first unread message

Robert Peirce

unread,
Aug 19, 2017, 1:00:14 PM8/19/17
to
Where are they stored and can they be accessed from outside iTunes? 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.

nospam

unread,
Aug 19, 2017, 1:08:00 PM8/19/17
to
In article <on9qqi$ibp$1...@gioia.aioe.org>, Robert Peirce
in the mobile sync folder, but it's not in a format that's is directly
usable. however, there are apps to access the data.

JF Mezei

unread,
Aug 19, 2017, 1:55:32 PM8/19/17
to
On 2017-08-19 13:00, Robert Peirce wrote:
> Where are they stored and can they be accessed from outside iTunes?

~/Library/Application Support/MobileSync/Backup

They are in proprietary format, and if you have chosen encrypted backups
they are, well, encrypted.


> 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.

Unfortunately, there is no selective restore of backups on the iPhone.
For instance, if you delete an app and then re-install the app, there is
no way to re-install that app's data from the last time a backup was made.

There is a file called "manifest.db" which is an SQLlite file which you
can use an SQLlite app to extract the data and get the weird file name
for the actual file you need. But decrypting that file is another issue.

There is no easy simple way to do this.


Wondering if it might be possible to create a "new" backup from within
OS-X whcih contains only a single file (or those files for that app).
Restoring it MIGHT not affect the rest of the iPhone. But that would
require the new backup meet all of iTunes' requirememnts (checksums,
encryption etc)

Jolly Roger

unread,
Aug 19, 2017, 2:39:24 PM8/19/17
to
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

Jolly Roger

unread,
Aug 19, 2017, 2:46:27 PM8/19/17
to
On 2017-08-19, JF Mezei <jfmezei...@vaxination.ca> wrote:
> On 2017-08-19 13:00, Robert Peirce wrote:
>> Where are they stored and can they be accessed from outside iTunes?
>
> ~/Library/Application Support/MobileSync/Backup
>
> They are in proprietary format

Nope. They are all standard formats:

# file ~/Library/Application Support/MobileSync/Backup/1e126e0c5462e509b639cd35d90f6b81a824fd15/*

!: ASCII text
00: directory
01: directory
02: directory
03: directory
.
.
.
Info.plist: XML document text
Manifest.csv: data
Manifest.db: SQLite 3.x database, user version 2
Manifest.db-shm: data
Manifest.db-wal: empty
Manifest.plist: Apple binary property list
Snapshot: directory
Status.plist: Apple binary property list
a0: directory
a1: directory
a2: directory
a3: directory
.
.
.

# file 00/*

00/000158bcea32c3b4844959d4aadac5434638d405: Apple binary property list
00/0009d6ec54d362a1651643c7de3ca98922777db8: Apple binary property list
00/0013ca08c28818afae8424d9e342c4dcdec64d3c: JPEG image data, JFIF
standard 1.01
00/0014310bf09a503606714f20a1c0602059a15e3d: Apple binary property list
00/0015fd5df9b7a4027bb2123386b4d1331793d92e: ASCII text, with no line
terminators
00/0016730ad61b8403acd8c9d353c12c000921eb90: Apple binary property list
00/001a8cca6cff06b46345d1f68b59f544008f03ed: Apple binary property list
00/001b9df47f602538c8570e167148c1acdc2d37c3: Apple binary property list
00/001d7382097ffb5b8480da33692ab8dc47b09d0e: Apple binary property list
00/001e94faeeffd6f6b3c736a41ae8b5764f865781: Apple binary property list
00/0022d7f2766cbceb53a846dcbda76e8c9262c07a: JPEG image data, JFIF
standard 1.01
00/00277a1149daaf3135e95bd3858cfb023eaee568: Apple binary property list
00/0027eefe4aa214a171e78ebc39fe79718702767f: Apple binary property list
00/002ad415936c03377031fe6e6883d5fd9d98ac91: PNG image data, 352 x 88,
8-bit/color RGBA, non-interlaced
00/002d6d3aed5db3ddf4facc543952712db6086fac: data
00/002dbaad4668cdcc694205326710f406960acb69: PNG image data, 500 x 334,
8-bit/color RGBA, non-interlaced
00/003153dc16fcf4801a7c55dbc6c7803153fe1e70: Apple binary property list
00/0032e14622091b51d26d4c275de7bcb4503540c0: JPEG image data, JFIF
standard 1.01
00/0038cfed6bdf51f30c8121feb3d29c291b9e466b: JPEG image data, JFIF
standard 1.01
00/0039a6588f095c6f74ee57f7a88e05fa51457d46: JPEG image data
00/003aa421714e289e5d80b475af869d3081c3c356: Apple binary property list
00/003c9cbd2fe9b5d4c3d86cbd64edf42260f39a87: ASCII text, with no line
terminators
00/004617673b0c5a889bdf5b3f1e966afd186d7895: ISO Media, MPEG v4 system,
version 2
.
.
.

And so on...

> and if you have chosen encrypted backups they are, well, encrypted.

Yep. So if you want to access backup data, you need to avoid encrypting
the backup.

> There is a file called "manifest.db" which is an SQLlite file which you
> can use an SQLlite app to extract the data and get the weird file name
> for the actual file you need. But decrypting that file is another issue.

The file doesn't need to be decrypted if your backups are not encrypted.

> There is no easy simple way to do this.

It's actually fairly simple to read any SQLite database.

Lewis

unread,
Aug 19, 2017, 9:52:15 PM8/19/17
to
In message <59987b91$0$61177$b1db1813$19ac...@news.astraweb.com> JF Mezei <jfmezei...@vaxination.ca> wrote:
> On 2017-08-19 13:00, Robert Peirce wrote:
>> Where are they stored and can they be accessed from outside iTunes?

> ~/Library/Application Support/MobileSync/Backup

> They are in proprietary format,

Once again, you are a either an ignorant fool or a shitbag liar.

I can never tell for sure, but one of those is always true.

There is nothing at all proprietary about the backup files format.

--
I want a party where all the women wear new dresses and all the men
drink beer. -- Jason Gaes

Robert Peirce

unread,
Aug 25, 2017, 4:23:13 PM8/25/17
to
It helps but I don't think I want to do it. It is probably easier not
to delete anything until I am pretty sure I won't need it, or if
possible, to export it before deleting it.
0 new messages