You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Restore accidentally deleted messages from old chat.db?

Hi!


My messages are all on iCloud (not backed up though) and I accidentally deleted a text thread on my phone. I had an old computer with an old chat.db file (from July 2020) that has MOST of the message history from this particular thread.


Is there a way to possibly restore this one thread to my iCloud messages from chat.db?


Or would it be possible to "merge" the old chat.db with the one text thread into the data on my iCloud without erasing any of my other data? (Note: I have my old laptop (with the old chat.db), where the message history is stored on the computer, and a newer laptop, where the messages are all downloaded through iCloud.)


I hope this question makes sense, I'll be happy to provide any more details or clarification if needed.

iPhone X, iOS 13

Posted on Sep 6, 2020 9:48 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 6, 2020 11:18 AM

This would be complicated to do. It's a SQLite database. For instance, have a look at the script someone wrote to try to do this:


https://gist.github.com/pchhetri/120a10cb33e0d462dc5a5776bd70f50d


Also, read the feedback, apparently the script did not work flawlessly. I personally would not try this, it was with an older OS and you risk making a small problem into a large problem.


One band aid type solution is to go to the messages thread on the computer that still has it and PRINT the entire thread, but print to a pdf file, not to a printer. Then you have a record of the thread in pdf format, and if you want to respond to one of the messages, you can paste that message into your working message thread and respond to that individual. Very imperfect but probably better than nothing.


Similar questions

1 reply
Question marked as Top-ranking reply

Sep 6, 2020 11:18 AM in response to cfung715

This would be complicated to do. It's a SQLite database. For instance, have a look at the script someone wrote to try to do this:


https://gist.github.com/pchhetri/120a10cb33e0d462dc5a5776bd70f50d


Also, read the feedback, apparently the script did not work flawlessly. I personally would not try this, it was with an older OS and you risk making a small problem into a large problem.


One band aid type solution is to go to the messages thread on the computer that still has it and PRINT the entire thread, but print to a pdf file, not to a printer. Then you have a record of the thread in pdf format, and if you want to respond to one of the messages, you can paste that message into your working message thread and respond to that individual. Very imperfect but probably better than nothing.


Restore accidentally deleted messages from old chat.db?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.