15

This question already has an answer here:

So unbelievably I have never cleared my history in SMS/iMessages/Messages. Ostensibly, I should be able to scroll up and eventually see my first text message from my first gen iPhone. This is, unsurprisingly, taking up a considerable amount of space on my phone, but a big part of why I've never cleaned it out is that it contains a tremendous number of pictures of my daughters my wife has sent me over the years. It doesn't seem like these get saved to my photo roll and there doesn't appear to be any way to bulk export them. It may be worth noting that I use desktop messages in Yosemite and it seems work well, so there may be an approach I can use from that angle.

What's the best way for me to archive all the photo attachments from almost seven years of text messages?

marked as duplicate by Ruskes, bmike Jun 16 '15 at 20:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

13

I had this same issue and was able to resolve it by extracting the data from a backup. I used the script (accessible via link) to accomplish this. Note that a Mac would be required - Also note, I am in no way affiliated with the source or content, just a user in the past.

  1. Run a phone backup via iTunes while connected to your computer
  2. In Finder, go to the Go menu -> Go to Folder, enter in ~/Library/Application Support/MobileSync/Backup
  3. Locate the most recently modified folder in the Backup folder
  4. Create a folder named iOSBackup folder on the desktop
  5. Copy the folder you found in Backup to iOSBackup
  6. Download iOSMessageExport (zip) which includes a set of perl scripts. Unzip the files into the iOSBackup folder. (You should see similar to the screenshot below) enter image description here
  7. Open Terminal
  8. Enter cd ~/Desktop/iOSBackup and press Return
  9. Enter perl backup.pl --directory_path <folder>/ and press Return. Replace with the name of the backup folder inside of iOSBackup (will vary from backup to backup) enter image description here
  10. Once the script has finished running, go back to the iOSBackup folder and look for a folder named _export enter image description here
  11. Inside of _export you should see folders for each date a message was sent/received, images/movies are located in here. HTML files of each conversation (by day) are also available enter image description here

Source: WonderHowTo

  • 6
    I'm sad to see this marked as a duplicate because your answer is significantly better than any on the other thread. Thanks for getting this one in there. – grovberg Jun 18 '15 at 12:30
  • @grovberg glad I could help! I opened a thread on Meta to discuss when questions should be marked as duplicates. If you'd like, you can view the thread over there. Else, again glad I could help! – smoooosher Jun 18 '15 at 16:07
  • Let's see about reopening this. @grovberg - mind if I reference the linked article or just remove the part about how to back the data up? This seems more about using the iTunes backup files so you feel free to delete messages on iOS. Am I reading you both correctly here? – bmike Jun 19 '15 at 13:43
  • I got the following error when running it: 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. Any idea why one may run into this error? – Amelio Vazquez-Reina Sep 13 '17 at 17:02
  • @AmelioVazquez-Reina check out github.com/basnijholt/iOSMessageExport. It's a fixed version of the script that does not throw the error. It still throws some different errors for me, but it exported everything just fine. – Jon Carl Oct 17 '17 at 13:42

Not the answer you're looking for? Browse other questions tagged .