ChatStorage.sqlite location & how to restore WhatsApp messages on your iPhone

Cover image for: ChatStorage.sqlite location & how to restore WhatsApp messages on your iPhone

If you’re a WhatsApp user and an iPhone owner, restoring WhatsApp messages back to your iPhone is easy with iPhone Backup Extractor. In this article we’ll teach you how to do it in a few steps.

How to extract and restore WhatsApp messages on your iPhone

In the method described below we use two devices, but you can use these instructions in different ways as long as you have a copy of these backups stored in a safe place. For example, you can use them to restore an old WhatsApp messages database on the same iPhone, or you can simply transfer your WhatsApp history to another device. You can even convert your WhatsApp database and import that to an Android device.

For this tutorial we used 2 devices:

  • An iPhone with the WhatsApp messages and data we want to extract
  • A second iPhone that'll receive the data from the first one

If you’re searching for a way to retrieve your WhatsApp messages, this article is what you need.

If you need to restore your WhatsApp messages on an iPhone, follow the next steps:

  1. Make an iTunes or an iCloud backup for the device from where you want to restore the messages. For iCloud support you’ll need a license. After logging in, you’ll be able to choose and download any backup file existing on your iCloud account. If you already have an iTunes or an iCloud backup with your WhatsApp chats and messages, you can skip this part.

  2. Download iPhone Backup Extractor for Windows or Mac, depending on your operating system, then install it.

  3. Start iPhone Backup Extractor and select the backup containing the WhatsApp messages, from the iPhone backup browser on the left-hand side.

    ChatStorage.sqlite location

  4. Choose "Expert mode", go to Application Groupsnet.whatsapp.WhatsApp.shared then select ChatStorage.sqlite. This file is the database used by WhatsApp to store your message history. Make sure you extract and download this file in a safe place. You’ll need it later. (You could just drag it out to your desktop.)

    Selecting the WhatsApp database
    Selecting the WhatsApp database

  5. Make a backup of the iPhone where you want to import the message history -- the second phone from our example. Go to the same path described at the previous step: Application

  6. Make a copy of the second phone's backup in a safe place. If you don’t know where the files are stored, we can show you where to look.

  7. After you start iPhone Backup Extractor, right-click on the ChatStorage.sqlite file and choose "Replace File". Then select the ChatStorage.sqlite file extracted at the third step.

    Important note: the messages from the database will be replaced with the old messages from the first backup, so make sure you have a copy of it. Now you’ll have a modified iTunes backup containing the WhatsApp messages and chats from another backup file.

    Replacing files in an iTunes backup
    Replacing files in an iTunes backup

  8. In order to restore those WhatsApp messages to your smartphone, you need to get the modified backup restored to your phone. To do this, connect your iPhone to your computer and start iTunes. Choose to restore the modified backup on your device.

That’s all! After the iPhone restarts, you’ll see the WhatsApp conversations imported on your device. You can browse through the conversations as if they were made using your iPhone. Note that media attachments aren't visible in the messages, as we didn't move them. We get onto that below.

This method works from iOS 8 all the way up to the latest version. That means you can restore the WhatsApp messages from an iPhone with iOS 8 on your iOS 11 device -- for example -- and vice-versa. You can also retrieve and transfer the message history and chat from an iCloud or iTunes backup. This method works also for encrypted iTunes backups.

How to extract the attachments from WhatsApp to your computer

If you need to extract images from WhatsApp to your computer, you should follow the next steps:

  1. Start iPhone Backup Extractor.

  2. Select the backup where the old messages and the pictures are stored. Now, you've multiple options to extract the WhatsApp attachments from the backup. Depending on your technical skills, you can choose any of the methods. We’ve ordered them from the simplest to most complex:

    • On the "Overview", click the WhatsApp icon and choose a location for the files. Images and the HTML files with your messages will be saved, along with your media attachments in an accompanying "data" folder.

    Extracting all WhatsApp messages and attachments
    Extracting all WhatsApp messages and attachments

    • Use "Preview" mode then select all the messages. Click on "Extract", choose HTML or PDF format, and select a location for export files. The images and the conversations will be saved on your computer. You’ll find the images separate to HTML files -- if you chose that format -- in a folder labelled "data".

    Previewing WhatsApp messages
    Previewing WhatsApp messages

    • Use "App View" then go to "WhatsApp Messenger" and click on "All Photos". The media attachments will be extracted in the chosen location. Hurrah!

    Viewing WhatsApp's app data
    Viewing WhatsApp's app data

  3. Use "Expert Mode" then go to Application Domainnet.whatsapp.WhatsAppLibraryMedia. Select the "Media" folder and extract the data to your computer. This solution will extract the pics and videos from your WhatsApp message history.

    Extract WhatsApp data in expert mode
    Extract WhatsApp data in expert mode

Now you've all the WhatsApp attachments extracted from your device. As you can see, restoring WhatsApp messages to your iPhone is simple, as long as you use iPhone Backup Extractor and have a backup file containing the messages and their attachments.

Have you experienced issues trying to restore your WhatsApp data back on your iPhone? Drop us a note on live chat or through our support centre. We'll do our best to help. 👊

About the author

Alexandra Petruș served as Reincubate's VP of Product for a number of years and remains a friend of the company. She's recognised as a Google Developer Expert for Product Strategy, and is a co-founder of Bucharest AI.

Reincubate's CEO at Buckingham Palace

Pictured above are members of Reincubate’s team meeting HM Queen Elizabeth Ⅱ at Buckingham Palace, after being awarded the UK’s highest business award for our work with Apple technology. Read our position on privacy, safety and security.

We've helped over 10,000,000 people recover their lost iPhone data. Let us help you too.

Can we improve this article?

We love hearing from users: why not drop us an email, leave a comment, or tweet @reincubate?

© 2008 - 2020 Reincubate Ltd. All rights reserved. Registered in England and Wales #5189175, VAT GB151788978. Reincubate® is a registered trademark. Privacy & terms. We recommend 2FA. Built with in London.