Open Gaetan1972 opened 7 years ago
im having the same issue with a backup i made today off my old iphone 4. i dont think the ios version is 'too new', but the itunes version that created the backup files might be.... any pointers would be helpful... (as there hasn't been any reply in over a month....anyone here?) Thanks Willem
I don't write Perl but the code's pretty easy to read.
The code assumes that there's a file named 3d0d7e5fb2ce288813306e4d4636395e047a3d28 directly in the backup directory and that the file is a SQLite DB.
I just opened that file in DB Browser for SQLite and it shows it as an empty DB.
... and that's probably because the file is empty.
I'm looking into iTunes (and iDevice) backups and what might have changed recently. One potentially useful link:
Extra Googe-fu would be appreciated.
From the last link I learned that the 3d0d7e5... file name is a hash of the path Library/SMS/sms.db. I guess that path changed.
Progress!
The SMS.db file moved into the 3d sub-directory of the backup directories. If you add 3d/
onto your export command you'll probably see some stuff being exported like I did:
kenny$ export PERLLIB=iOSMessageExport/ && perl iOSMessageExport/backup.pl --directory_path 42724f779babf4cfce4d17e20bc22ce12aae5c97/3d/
group message from me
...
group message from me
no file at not-my-real-backup-directory/3d/31bb7ba8914766d4ba40d6dfb6113c8b614be442 at iOSMessageExport/iOSContacts.pm line 62.
So I guess the code does need to be modified. That missing file isn't under the backup directory either; it's been moved to a 31 sub-directory like the SMS DB.
Another fork of this repo seems to have a fix for this:
This issue is covered by the older issue #13 too.
I also encountered this "no such table" error and resolved it thanks to a comment on this page (also below):
1Som SanDiego SOM SANDIEGO 1 YEAR AGO In case anyone lands here looking to run this script and find it not working, here's what I've found.
At some point in the last year or two, it looks like Apple started placing files into subfolders beginning with the first 2 characters of the GUIDs. So, for example, the "3d0d7e5fb2ce288813306e4d4636395e047a3d28" file that the script looks for is now in "3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28".
The script ends up not finding it and failing.
Two solutions:
1) Learn perl and go through and update the script to learn how to navigate the structure. 2) Move all of the files from the subfolders into a single giant folder.
The easiest way to do #2 is to do a search on your iTunes backup folder for ALL files. This should bring up all of the files in all of the subfolders. For me, this was 25k files. Select ALL of these files and move them into a single folder.
Once that's done, you can run this script against the new 1-folder-containing-all-files folder.
To complete solution 2 I did a search in finder (within the backup folder) for -kind:folder
then SAVED the search to the sidebar, clicked the sidebar search then continued the solution by selecting everything and putting everything into a new directory, and finally performing the backup.pl perl script on that new directory.
Hope this helps ✌🏼
Hello,
I tried the script for the first time but wondering if tables in sql have changed in latest IOS versions as I get this error:
GFEIGE-M-P1X7:Backup-iPhone gfeige$ perl backup.pl --directory_path /Volumes/LaCie/Backup-iPhone/d9b7d6f1eea5628e7c77430213e57aae15854dc1/ DBD::SQLite::db prepare failed: no such table: message at iOSMessages.pm line 86. DBD::SQLite::db prepare failed: no such table: message at iOSMessages.pm line 86.
Where can I find the description of the format of the backup sql file ?
Thank you
Gaétan