How do I backup iMessages to my PC for free?

I'm getting ready to wipe and sell my old 4th-generation iPod touch, and I'd like to get a human-readable copy of all of my iMessages before I do so.

So far, I've found two solutions, but unfortunately they both cost money:

  • imessage-backup.com - basically you upload a certain file from the backup and it does some processing on the backend to make it human-readable. $7.99 per backup file.
  • iExplorer can also grab iMessages. You can see them within the app, but it forces you to register ($34.99) to export them.

Obviously there is some way to extract the data. I opened up the backup file in a text editor, and I could see messages, but it wasn't really "human-readable." I tried opening the backup file in SQLite Database Browser (the format in which the iMessages are supposedly backed up in), but it came up blank.

Is there a free way (preferably on Windows or Linux) to export iMessages?


Have you tried extracting them from your back up file? See this link.


NOTE: This is not a particularly relevant answer for this question, but it seems that some new questions (new - as in June 2020) may be closed as duplicates to this one. But this question, and its accepted answer, are going on 7 years old now - things have changed. So while this answer may not be particularly relevant to this question, it may provide something useful for those seeking answers to related questions.


Some caveats before reading further:

  1. This answer uses 3rd party software running on macOS 10.15.5. In my case, apparently my iPhone and my Macbook Pro keep my iMessage messages synchronized; i.e. messages I see on my phone are the same I see on my Mac.

  2. This answer does not cover extraction of or access to the iMessage database file(s) from an iOS device. It may be possible to do do this, but that's not covered in this answer.

  3. What this answer does do: Describe a method to extract all messages from the iMessage database (on a Macbook) as plaintext. Specifically:

  • The text of all messages from all "conversations" are extracted to a series of folders. There is one folder for each "conversation" - a conversation folder.

  • the textual content of all messages within each "conversation" are written to single file under its corresponding conversation folder. Depending upon the version of the database and/or macOS, the media content from all messages is extracted to a sub-folder.

In Summary: All iMessage messages may be extracted to plain text files. These plaintext files may be transferred to other machines for storage or further analysis.


The procedure:

I have used an app called baskup for making backups of my iMessage data on my Macbook. I've found it to be useful, but IMHO it's "not ready for prime time". By that I mean the app looks like it was never quite finished. Version 2 of the app was available as a download, but has been removed for unspecified reasons. The author of baskup claims that he is working on version 3, but that claim has been standing since December, 2018 - over 18 months ago as I write this.

The author also has a GitHub repo for baskup. The app is no longer available from this location either, but there is a shell script that still works (at least partially) on macOS.

The author states the shell script does essentially the same thing as the app. This seems an accurate statement, except for the fact that the script does not extract the media files from "conversations". Whether this is due to changes Apple has made to the database, or due to a failing of the script I do not know at this time.

To run the script on macOS 10.15.5, I did the following:

  1. For reasons unclear to me, the folder location for the iMessage data is not visible from the terminal initially (ls -l failed) - even though it was visible in Finder: /Users/<username>/Library/Messages

  2. In System Preferences, Security & Privacy, Privacy tab, Full Disk Access: give Terminal Full Disk Access.

  3. In the script baskup.sh, make the following change:

FROM:

NEEDS_MODIFICATION=$(echo $OS_Version '>=' $LAST_VERSION | bc -l)

TO:

NEEDS_MODIFICATION=$(echo ${OS_Version:0:5} '>=' $LAST_VERSION | bc -l)
  1. Place the modified baskup.sh script in a convenient location, mark it as executable via chmod, and run it. The results will appear under a folder named backup beneath the folder where you've located the script.