Backup files · Photos

12b144c0bd44f2b3dffd9186d3f9c05b917cee25is Photos.sqlite

In an iPhone backup, the file 12b144c0bd44f2b3dffd9186d3f9c05b917cee25 is Photos.sqlite. The Photos library database: each photo and video's file name, date, albums, and whether it's a favorite, hidden or deleted.

Real namePhotos.sqlite
DomainCameraRollDomain
PathMedia/PhotoData/Photos.sqlite
In the backup folder12/12b144c0bd44f2b3dffd9186d3f9c05b917cee25
Its name is the SHA-1 ofCameraRollDomain-Media/PhotoData/Photos.sqlite
AppPhotos
Seen iniOS 13.3.1, 13.4.1, 15.3.1, 16.0, 16.1.2 and 17.3.
Needs an encrypted backupNo. Unencrypted backups have it too.
OpenExtract reads itYes, on the Photos screen. Guide: Extract photos from an iPhone backup

What it holds

Photos.sqlite is the index of the photo library. It doesn't hold the pictures: those are separate files under Media/DCIM/ in CameraRollDomain.

Each photo or video is a row in ZASSET, called ZGENERICASSET before iOS 14, with its folder and file name in ZDIRECTORY and ZFILENAME. Albums are in ZGENERICALBUM.

A photo kept only in iCloud, with Optimize iPhone Storage turned on, can have a row here but no file in the backup.

Key columns

In iOS 13.3.1 and 13.4.1, ZASSET is called ZGENERICASSET, with the same columns.

Tables by iOS version

iOS 13.3.1 has 66 tables:

ACHANGE, ATRANSACTION, ATRANSACTIONSTRING, ZADDITIONALASSETATTRIBUTES, ZADJUSTMENT, ZALBUMLIST, ZASSETANALYSISSTATE, ZASSETDESCRIPTION, ZCLOUDFEEDENTRY, ZCLOUDMASTER, ZCLOUDMASTERMEDIAMETADATA, ZCLOUDRESOURCE, ZCLOUDSHAREDALBUMINVITATIONRECORD, ZCLOUDSHAREDCOMMENT, ZCODEC, ZCOMPUTEDASSETATTRIBUTES, ZDEFERREDREBUILDFACE, ZDETECTEDFACE, ZDETECTEDFACEGROUP, ZDETECTEDFACEPRINT, ZEDITEDIPTCATTRIBUTES, ZEXTENDEDATTRIBUTES, ZFACECROP, ZFILESYSTEMBOOKMARK, ZFILESYSTEMVOLUME, ZGENERICALBUM, ZGENERICASSET, ZINTERNALRESOURCE, ZKEYWORD, ZLEGACYFACE, ZMEDIAANALYSISASSETATTRIBUTES, ZMEMORY, ZMOMENT, ZMOMENTLIST, ZMOMENTSHARE, ZMOMENTSHAREPARTICIPANT, ZPERSON, ZPERSONREFERENCE, ZPHOTOSHIGHLIGHT, ZSCENECLASSIFICATION, ZSCENEPRINT, ZSEARCHDATA, ZSUGGESTION, ZUNIFORMTYPEIDENTIFIER, ZUNMANAGEDADJUSTMENT, Z_17CLUSTERREJECTEDPERSONS, Z_17REJECTEDPERSONS, Z_17REJECTEDPERSONSNEEDINGFACECROPS, Z_1KEYWORDS, Z_25ALBUMLISTS, Z_26ASSETS, Z_34MEMORIESBEINGCURATEDASSETS, Z_34MEMORIESBEINGEXTENDEDCURATEDASSETS, Z_34MEMORIESBEINGMOVIECURATEDASSETS, Z_34MEMORIESBEINGREPRESENTATIVEASSETS, Z_34SUGGESTIONSBEINGKEYASSETS, Z_34SUGGESTIONSBEINGREPRESENTATIVEASSETS, Z_45INVALIDMERGECANDIDATES, Z_45MERGECANDIDATES, Z_METADATA, Z_MODELCACHE, Z_PRIMARYKEY, Z_RT_GenericAsset_boundedByRect, Z_RT_GenericAsset_boundedByRect_node, Z_RT_GenericAsset_boundedByRect_parent, Z_RT_GenericAsset_boundedByRect_rowid

Then, version by version:

The iOS 16.0 backup is encrypted with a password that isn't public, so only its list of files was checked, not its tables.

How to open it

Free, in OpenExtract. Open the backup in OpenExtract and choose Photos. Timeline uses it too. OpenExtract shows the library with its albums, favorites and hidden photos, and copies the originals to your computer. Step by step: Extract photos from an iPhone backup.

By hand. In a backup that isn't encrypted, 12/12b144c0bd44f2b3dffd9186d3f9c05b917cee25 is an ordinary SQLite database with no extension. Copy it out of the backup folder and open the copy with any SQLite browser, such as DB Browser for SQLite. Work on a copy: changing anything inside a backup can stop it from restoring.

In an encrypted backup, the file in the backup folder is encrypted with a key of its own, which only the backup password unlocks, so nothing can open it until it's decrypted. OpenExtract does that when you open the backup and type its password.

Checked against public test backups from iOS 13.3.1, 13.4.1, 15.3.1, 16.1.2 and 17.3, and the file list of an iOS 16.0 backup, reading only file, table and column names. How we checked · All backup files

Read the backup, not the hashes.
OpenExtract opens iPhone backups for you. Free, open source, nothing uploaded. Mac · Windows · Linux.
Download OpenExtract →