Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fred Zed

macrumors 603
Original poster
Aug 15, 2019
5,947
6,616
Upstate NY . Was FL.
My messages on the MBP are not synced to the iCloud. Many of my messages on my iPhone which are linked to the iCloud have disappeared over the last month or so. I would like to enable iCloud sync on my MacBook since most my messages are still present on this device, however before enabling iCloud sync on my Macbook I would like to make a copy of the messages folder incase the sync mirrors the messages of my iPhone which I don't want it to do and to be able to revert back if the sync doesn't work out . Is this possible? Thanks.
 
Did this end up working out for you? I have 40gb of messages in my message folder on my mac and i want to offload them onto a drive so i can load them later and preserve iCloud space.
 
The basic info re messages is stored in a sqlite database ~/Library/Messages/chat.db. You could save just that and use a sqlite viewer to see the data. Thes was sufficient a few years ago, but Messages has become more complex and a lot of data is stored in binary blobs inside chat.db - I don't know how to view that.

There is other stuff in ~/Library/Messages. So I would start by closing Messages app and copying the whole folder somewhere else.

You need to explicitly delete the message conversations from Messages. Add that point there is no going back as that will delete them iCloud too!

Whether it would work to copy that back sometime in the future - I don't know! So I don't recommend it.

Much safer would be to export from Messages and to keep the exports for future viewing with Preview, etc. and never try to put back into Messages. Once you have exports which suit your needs, you can then remove from Messages and iCloud.

Choices:

1) In Messages you can select one or more conversations and use the File > Print sequence to create a PDF.

2) There are iMessages export apps, but you need one that is up to date with current Messages database format.

2a) imessage-exporter https://github.com/reagentx/imessage-exporter looks good. I have not used it but development is active and it says for macOS 15.0.1. Worth experimenting with.

2b) I use iMazing (paid app with free trial) which can export to other formats as well as PDF. This knows current Messages format. The Messages export is just a small part of a much bigger software package.

2c) There are other apps (web search) but I don't know which claim to support macOS 15 Messages.
 
The basic info re messages is stored in a sqlite database ~/Library/Messages/chat.db. You could save just that and use a sqlite viewer to see the data. Thes was sufficient a few years ago, but Messages has become more complex and a lot of data is stored in binary blobs inside chat.db - I don't know how to view that.

There is other stuff in ~/Library/Messages. So I would start by closing Messages app and copying the whole folder somewhere else.

You need to explicitly delete the message conversations from Messages. Add that point there is no going back as that will delete them iCloud too!

Whether it would work to copy that back sometime in the future - I don't know! So I don't recommend it.

Much safer would be to export from Messages and to keep the exports for future viewing with Preview, etc. and never try to put back into Messages. Once you have exports which suit your needs, you can then remove from Messages and iCloud.

Choices:

1) In Messages you can select one or more conversations and use the File > Print sequence to create a PDF.

2) There are iMessages export apps, but you need one that is up to date with current Messages database format.

2a) imessage-exporter https://github.com/reagentx/imessage-exporter looks good. I have not used it but development is active and it says for macOS 15.0.1. Worth experimenting with.

2b) I use iMazing (paid app with free trial) which can export to other formats as well as PDF. This knows current Messages format. The Messages export is just a small part of a much bigger software package.

2c) There are other apps (web search) but I don't know which claim to support macOS 15 Messages.
Thanks for response and options presented. To avoid risk would it be possible for me to use Time Machine to backup ( or another app specifically for backing up messages in MacOS ) then me turning ON iCloud for messages sync on my Mac? As a fall back if my messages should sync the wrong way could I reverse the process by restoring something from time machine after turning off iCloud messages on the MacBook and deleting the messages on my MacBook. ?
 
Thanks for response and options presented.
I must admit that my answer was most directed to the situation of @macbackup11233.

Your situation is more complex in that you have two separate collections of messages. If I have got that right:
a) Messages on your Mac which are NOT synced with iCloud;
b) Messages on your iPhone which are synced with iCloud.
And that before attempting to join them, you want (very sensibly) to have a way of recovering from TM in case it all goes wrong. The "going wrong" is, I fear, fairly likely.

I am very nervous of encouraging you to rely on TM as a way of recovering just messages (rather than a whole of Mac restore). I can't find any recent descriptions of a) exactly what needs to be restored and b) then linked up with iCloud.

As well as ~/Library/Messages, there are a number of of folders inside ~/Library/Containers which relate to Messages. Exactly which need to be restored, I don't know!

I realise, I am not being very helpful. Rather I am just explaining my lack of certainty!! :rolleyes:

If you do press ahead with combining your Mac and iPhone/iCloud messages, I strongly suggest exporting all your message conversations to another format (most obviously PDF). Just in case.

Really I would rather you waited for better/clearer advice. Sorry.
 
  • Like
Reactions: Fred Zed
Thank you for your thorough response @gilby101. I thought I was being a bit optimistic in thinking I could just copy ~/Library/Messages and call it a day.

Much safer would be to export from Messages and to keep the exports for future viewing with Preview, etc. and never try to put back into Messages. Once you have exports which suit your needs, you can then remove from Messages and iCloud.

You raise an important point. There is no way to even view the backups right now without using iMessage. Which in my opinion has terrible support for searching and dealing with historic messages. The way iMessage handles historic searching, etc. it almost feels pointless to even have the "forever" option selected in iCloud for messages.

To your point, the only reliable way to archive and back up iMessages is to convert them to a format that allows for searching and archiving across multiple platforms and operating systems.

I was looking at iMazing but didn't like their licensing structure and I'm also only looking for messaging backups. I might be mistaken but it seems like you need to buy a new license every time you upgrade or change phones?

I plan to investigate https://github.com/reagentx/imessage-exporter and possibly save all my old text messages as pdf's or something so i can search through them.

@Fred Zed I don't completely understand what you're trying to do, but i feel like it's not possible. The way that apple has iCloud tightly integrated with messages with so much obfuscated from the user we're each just left with a button to push and apple's "it just works" under the hood mentality.

I dont know where your MBP messages sit but you'd have to somehow merge all the data and then resync back to iCloud. Is there some backup solution that you can backup both devices to the same file? Just an idea. I could be wrong.
 
Last edited:
Thank you for your thorough response @gilby101. I thought I was being a bit optimistic in thinking I could just copy ~/Library/Messages and call it a day.



You raise an important point. There is no way to even view the backups right now without using iMessage. Which in my opinion has terrible support for searching and dealing with historic messages. The way iMessage handles historic searching, etc. it almost feels pointless to even have the "forever" option selected in iCloud for messages.

To your point, the only reliable way to archive and back up iMessages is to convert them to a format that allows for searching and archiving across multiple platforms and operating systems.

I was looking at iMazing but didn't like their licensing structure and I'm also only looking for messaging backups. I might be mistaken but it seems like you need to buy a new license every time you upgrade or change phones?

I plan to investigate https://github.com/reagentx/imessage-exporter and possibly save all my old text messages as pdf's or something so i can search through them.

@Fred Zed I don't completely understand what you're trying to do, but i feel like it's not possible. The way that apple has iCloud tightly integrated with messages with so much obfuscated from the user we're each just left with a button to push and apple's "it just works" under the hood mentality.

I dont know where your MBP messages sit but you'd have to somehow merge all the data and then resync back to iCloud. Is there some backup solution that you can backup both devices to the same file? Just an idea. I could be wrong.
My messages in the iCloud sync is disabled on my MacBook. Due to some unforeseen issues I’ve lost a many messages on my iPhone which does sync to the iCloud. I’d like to be able to have what’s on my MacBook messages wise on my iPhone. I was considering turning on the iCloud switch for messages on my MacBook, but concerned that it may end up emulating the messages I’ve got on my iPhone.
 
I must admit that my answer was most directed to the situation of @macbackup11233.

Your situation is more complex in that you have two separate collections of messages. If I have got that right:
a) Messages on your Mac which are NOT synced with iCloud;
b) Messages on your iPhone which are synced with iCloud.
And that before attempting to join them, you want (very sensibly) to have a way of recovering from TM in case it all goes wrong. The "going wrong" is, I fear, fairly likely.

I am very nervous of encouraging you to rely on TM as a way of recovering just messages (rather than a whole of Mac restore). I can't find any recent descriptions of a) exactly what needs to be restored and b) then linked up with iCloud.

As well as ~/Library/Messages, there are a number of of folders inside ~/Library/Containers which relate to Messages. Exactly which need to be restored, I don't know!

I realise, I am not being very helpful. Rather I am just explaining my lack of certainty!! :rolleyes:

If you do press ahead with combining your Mac and iPhone/iCloud messages, I strongly suggest exporting all your message conversations to another format (most obviously PDF). Just in case.

Really I would rather you waited for better/clearer advice. Sorry.
Your first paragraph is exactly what is going on and what I want to achieve.

Something occurred at some point which diminished my iCloud messages on my iPhone. Prior to upgrading my iPhone messages in the iCloud was around 25GB after iPhone to iPhone transfer it shrunk to under 1GB.

In essence I’m looking for something so that I can backup my messages on my MacBook before enabling the iCloud switch and sync process. So should it all go wrong I disable the iCloud switch on the MacBook, delete all messages and then restore all messages back to how it was prior to syncing.
 
I was looking at iMazing but didn't like their licensing structure and I'm also only looking for messaging backups. I might be mistaken but it seems like you need to buy a new license every time you upgrade or change phones?
iMazing licensing has been criticised!! Yes, you need a license for every idevice. Not too bad if you keep your iPhone for 4 or 5 years (like I do), but punishing for those who change every year or two. Painful if you have a household of iPhones. I am sure it is the best (most reliable, widest feature set) of the 3rd party apps for linking iPhones/iPad with a Mac. Next time I need to make new purchase, I will be exploring the alternatives more carefully.
I plan to investigate https://github.com/reagentx/imessage-exporter and possibly save all my old text messages as pdf's or something so i can search through them.
Do let us know how you go with that.
 
  • Like
Reactions: macbackup11233
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.