Apple Event: May 7th at 7 am PT

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

how to transfer Messages history from Mavericks to Yosemite clean install

I would like to do a clean install of Yosemite on my MacBook, but retain all of my Messages history and attachments from my current Mavericks install. Is this possible? What files do I need to copy from the Mavericks install (before I wipe the HD) and where do I need to put them after I install Yosemite (cleanly)? Anything else I need to do after copying them?


Thanks!

MacBook Pro with Retina display, OS X Mavericks (10.9.5)

Posted on Oct 19, 2014 7:12 AM

Reply
14 replies

Oct 19, 2014 10:05 AM in response to boombass

I managed to finally get mine to work, but not after a bit of trouble and losing new messages since my time machine back up (about a days worth since my backup replaced my current. I backed up and upgraded last night, and I figured out how to restore messages this morning, so anything in between that I got on my phone was lost. no big deal).


Much of the below is from other discussions, so I don't want to take credit for it, but wanted to make it easy for you, and there was one small change.


  • First make sure you can see hidden files by opening terminal and inputting: defaults write com.apple.finder AppleShowAllFiles YES
  • QUIT YOUR MESSAGES APP
  • Replace the following files from your backup to your current clean install. Pretty much all the files should be in the same spot, except for one folder that I'll explain further below.
  • Same File path
    • /users/<name>/Library/Messages-------> /users/<name>/Library/Messages/

      this folder should include 4 files:

      • chat.db
      • chat.db-shm
      • chat.db-wal
      • the folder "Attachments"
    • /users/<name>/Library/Preferences----> /users/<name>/Library/Preferences

      copy any file that includes iChat or Messages in the .plist

  • Different File path

    I am not sure if this matters, but it's something I noticed when I got a message in my clean install before trying to restore my history. In Yosemite, I noticed that that "Attachments" and "Archive" folder are both in /users/<name>/Library/Messages, whereas in Mavericks, the "Attachments" folder is in that file path, but the "Archive" folder is located in /users/<name>Library/Containers/com.apple.iChat/Data/Library/iMessages/Archive, and within this same folder there is a shortcut to the Attachments folder. (I'm not sure if this matters, but this worked for me). I hope I didn't confuse you there!

    • /users/<name>/Library/Containers/com.apple.iChat/Data/Library/Messages/Archive-------> /users/<name>/Library/Messages/
  • Restart your computer
  • Open Messages and it will rebuild your database.
  • Ta da!

Oct 20, 2014 6:00 AM in response to RMI22186

Thank you, RMI22186! I tried this last night and it worked perfectly. All of my conversations and attachments were intact on my clean install of Yosemite. Excellent work! Thank you for writing it up so clearly.


The Messages app is becoming more and more important to me on my Mac and my iPhone. It is nice to have a record of all my conversations. I hope that one day Apple makes it easier to back up and restore and merge conversations and attachments.


I have one more question. In your instructions you say to copy any file that includes iChat or Messages in the .plist in /users/<name>/Library/Preferences. Does that include the folder /users/<name>/Library/Preferences/ByHost? I copied all the iChat and Messages files in there, and replicated the directory structure on my new install. Was that a necessary step?


Thanks again!

Oct 20, 2014 9:16 AM in response to boombass

You're welcome!


That's a great question...and to be honest I don't know the answer to that. I'm not too advanced of a Mac person, but I looked it up and found the following:


http://www.cnet.com/news/about-the-os-x-byhost-preferences-directory/


It seems that byhost preferences may be from major changes to your system? I'm unsure, but I did not take this step and have had no problems with my Messages on Yosemite.


I agree about the importance of making it easy to backup. It should be as simple as Contacts where you just export a full backup.


Glad this helped...this was my first time posting an answer on the forums so I'm now 1 for 1 🙂

Oct 20, 2014 11:23 AM in response to RMI22186

I may run through the procedure again, omitting the ByHost directory. See if that works.


I'd even go so far as to say your message history should be backed up in iCloud, encrypted of course, and it could be accessed at will on your Mac or iOS device, as well as through icloud.com. It would be great to have an iCloud Messages app as well.


Very happy with all your help. Thanks again!

Oct 22, 2014 1:02 PM in response to boombass

This is awesome thank you. However, I wondered you can then help on this one (sorry to hijack thread).

Upgraded to Yosemite and tried to bring over my Messages history like I used to do on Mavericks by copying the "Messages" folder in "Library" only—that didn't work and that's okay. However, now every time I restart the laptop I keep loosing all the history i Messages and it's completely blank! I can see all the .ichat history files in the Library folder, but not keep them inside the app (if that makes sense- http://cl.ly/image/38273W1Z222M)


Is there ANY way I can rebuild the DB or somehow make it work again? I tried to delete the chat.db etc, also, but didn't work.

Thank you

Oct 22, 2014 1:18 PM in response to Kristian Kruse

To be honest I'm not sure how to rebuild the database. It seems like the file directory changed slightly when compared to Mavericks. Can you try going through the steps I laid out exactly? Looks like you might be missing a few files/folders if all you did was copy the "Messages" folder from only
Library". This will mean that you will lose any new messages, but seems to work.

Oct 22, 2014 2:32 PM in response to RMI22186

I don't have the old computer anymore, hand to deliver it back to work—hence I just tried to overwrite. That didn't work, and then I tried (after copying out on desktop) to delete and let it rebuild itself. Now it just doesn't really work and it doesn't make sense to me, as it rebuild the chat.db by itself. So there's nothing to do it seems?

Oct 14, 2015 1:47 PM in response to boombass

Hi,


The By Host folder normally contains versions of the .plists that might be used if your were using a Network boot.

That is to say they try an identify you even more closely as there may be other User who use your computer.


Generally if you are not in a server set up then they can be ignored.



User uploaded file

9:47 p.m. Wednesday; October 14, 2015


 iMac 2.5Ghz i5 2011 (Mavericks 10.9)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad

Oct 14, 2015 1:57 PM in response to Kristian Kruse

Hi,


If you moved a folder from another computer to this one you may not "Own" the Folder or even have Read and Write permission to it.

The same applies to individual Files as well.


So even if your called the Mac User account on the newer computer to match the old one the Ownership might still be an issue.


Open a Finder Window.

Hold down the ALT key whilst using th Go Menu

Select the Library that appears.

Navigate to Messages

Right Click on one of the Chat.db items and choose Get Info from the Menu

In the Panel scroll to the bottom.

It should list the User's Shortname (which should be the one you use on this Mac).

Unlock the Padlock then which the User name highlighted open the Cogwheel type icon under the List.

It should read "Make (yourShortName) (me) the Owner" but it should be greyed out if you already Own it.

Example:-

User uploaded file

Repeat for the other database items.


In the Finder use the View Menu and choose "Show Path Bar"

Right Click the Messages folder icon and double Check your Own that and have Read and Write Permission to that as well.



User uploaded file

9:57 p.m. Wednesday; October 14, 2015


 iMac 2.5Ghz i5 2011 (Mavericks 10.9)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad

how to transfer Messages history from Mavericks to Yosemite clean install

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