14

I have WhatsApp set up on my iPhone with iCloud backup. I don't want my WhatsApp media polluting my Photos stream, so I've disabled "Save to camera roll", as I didn't see a way to keep WhatsApp images/video separate to my own photos.

enter image description here

How can I access this backup and see the contents? I don't want to restore to a new phone, I want to actually view the content (specifically I want to import the videos and images into Lightroom).

  • I've tried searching Google but there are so many spam articles from people offering dodgy apps
  • I don't see any data on my Macbook in iCloud Drive
  • I do see the WhatsApp data in my Macbook iCloud settings pane when I click "Manage" in the bottom right corner. This storage screen shows 1.3Gb of WhatsApp data but only lets me delete the data, not access it.

    enter image description here

How can I get access to my data?

3 Answers3

17

The short answer is via iCloud Drive.

Your WhatsApp backup(s) are stored in a hidden folder of iCloud Drive on your MacBook (if you signed into iCloud and turned on iCloud Drive).

To find your WhatsApp backup(s):

Launch Terminal (in /Applications/Utilities folder) Type the following commands

cd ~/Library/Mobile\ Documents/
find *whatsapp*

You should see all the files related to your WhatsApp backup(s).

If you don’t see anything, then make sure that iCloud drive is turned on. If you only see *.icloud files, then turn off “optimize mac storage” in the icloud system preferences.

To my knowledge, you can’t access directly the messages as they are stored in an encrypted SQLite database.

The documents, pictures and videos are stored in separate, unencrypted archives:

Document.tar (PDFs and other attachments) Media.tar (pictures) Video.tar (videos) To extract what’s in there, copy those files to your desktop via the following terminal command:

cp *whatsapp*/Accounts/*/backup/*.tar ~/Desktop

Then, double-click on the .tar files to extract a folder structure containing the files organised by conversation.

Note: If you have multiple WhatsApp accounts backed up to the same iCloud account, you’ll need to replace the ‘*’ between “Accounts/” and “/backup” by the desired phone number.

Hope this helps!

Indeximal
  • 3
  • 2
  • 1
    As is explained in the link shared by @ankiiiiiii these files don't contain any relevant data. – nohillside Aug 03 '19 at 17:11
  • 3
    They did for me. I was able to extract the Media.tar GIFs.tar and Videos.tar which all contained data that I was able to import to Lightroom. In other words, they were actual files as opposed to .icloud files or .plist files. I'm not sure why that's the case on my machine but it worked for me – Timmy O'Mahony Aug 03 '19 at 17:57
  • 1
    This is not working for me, the folder is empty so it seems not to download the content from iCloud. I'm 100% sure its turned on and should sync all relevant content. – Einar Ólafsson Nov 18 '19 at 01:51
  • 1
    I could not extract the files (e.g. .Media.tar.icloud) but they were downloaded, as the size of the files seems reasonable. Though, it seems, there is some encryption that prevents reading. @EinarÓlafsson this answer mentions a tool that forces the downloading. – BadAtLaTeX May 17 '20 at 11:22
  • I had *.icloud files as well and wanted to get the "full" files. The icd tool linked to in @gr4nt3d's comment did not work for me. The brctl tool did. Instructions at this answer: https://apple.stackexchange.com/a/387727/78994. – nishanthshanmugham Mar 21 '21 at 06:05
  • How can I open/decrypt the *.enc files from the backup? I have end-to-end encryption activated for WhatsApp Backups and I know the password that I set. – johk95 Dec 05 '23 at 13:28
3

The answer from Kanthala Raghu was correct for me. However, I got distracted by the fact that I (like other commenters) only found small .icloud files. The trick was a small comment that said to disable "Optimize Mac storage" (see step 5).

In short:

  1. Create the backup in your iPhone WhatsApp via Settings -> Chats -> Chat-Backup -> Backup create now

  2. On your Mac, open Terminal and goto folder cd ~/Library/Mobile Documents/

  3. Find the folder that has WhatsApp in the name find *whatsapp* and change into it.

    For me the result looked like this; only small *.icloud files.

    MyMacOne:Mobile Documents dietrich$ find *whatsapp*
    34T7UZP4O8~net~whatsapp~WhatsApp
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup/.Thumbnail_1.tar.icloud
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup/.ChatStorage.sqlite.enc.icloud
    ...
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup/.Media.tar.icloud
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup/.Document.tar.icloud
    34T7UZP4O8~net~whatsapp~WhatsApp/Accounts/491731234567/backup/.BackedUpKeyValue.sqlite.enc.icloud
    34T7UZP4O8~net~whatsapp~WhatsApp/Documents
    
  4. If you have no *.icloud files, goto step 6.

  5. On your Mac (mine is on Big Sur) open System Preferences -> Apple ID
    There is a checkbox for Optimize Mac Storage, it should be deselected. Option should not be selected In my case it was selected and when I deselected it, the *.icloud files were replaced by the full files. Found it here: https://www.imore.com/how-customize-or-disable-optimized-storage-mac

  6. Copy *.tar files that contain the images and documents.

Dietrich
  • 201
  • Doesn’t selecting the .iCloud file in Finder and pressing the spacebar to spotlight it download all the data from iCloud so you can keep optimize storage on? Perhaps someone knows and can edit in a command line tool to rehydrate these files once they are evicted from local storage as part of an optimization pass…. – bmike Dec 14 '23 at 16:34
1

I've been hunting around for solutions to this for a few hours.

You want to use this tool that is designed specifically to download WhatsApp backups from iCloud and decrypt them (along with a great explanation of what's going on here): https://blog.elcomsoft.com/2017/07/extract-and-decrypt-whatsapp-backups-from-icloud/

  • 2
    It's a quite interesting article particularly for getting the explanation of the encryption/decryption mechanisms used by whatsapp. But I'd like not to trust the Elcomsoft software, but rather know the technical details how to get the decryption key from Whatsapp by using my combination of the phone number (SIM) and Apple ID. Perhaps, an open-source implementation just for this. Then, having the key, I'd decrypt the backup data manually with the key. – imz -- Ivan Zakharyaschev May 05 '21 at 17:23