How to “merge” the Messages transcripts in OSX

ichatmessages

EDIT: Perhaps a better way to say all of the below, is this: Is there a way to restore my Message (iChat) history onto my iMac, from my iCloud backup? All of my iDevices have the complete chat history, so this seems reasonable.

Original post follows…

My system got into a very weird state today, so I decided the best option was to restore to a new HD from a Time Machine backup. The last backup I had was from a month ago, but it restored fine.

Now I have my new HD with 1-month old data, and my old HD with current data that I want to recover parts of.

I found today's messages transcripts in ~/Library/Messages/Archive and I can view them just fine. But even after I added today's folder to my live Archive folder on the boot drive, Messages will not see the current chats at all.

How can I "import" or "merge" or otherwise get my latest Messages transcripts to be blended in with the old ones?

Best Answer

How about restoring from your backup just the Messages Archive folder contents? (Open that folder in the Finder; then choose "Enter Time Machine" from the Time Machine menu in the Menu Bar; then select the most recent backup that has your full Messages history.) On restore, if anything presently in that folder has the same name, you'll be offered the choice to keep old/new/both.

Relatedly, check out this answer: https://apple.stackexchange.com/a/117558/10581


As far as merging goes, there are two ways: in the Finder, or in the Terminal. Both of these would require restoring your Time Machine backup of ~/Library/Messages/Archive to another, temporary location.

The Finder method is done by holding the Option key while dragging things to a location containing other things of the same name(s). If the destination contains items with the same name(s) as what is being dragged, it'll offer an option to Merge. But if what is being dragged contains items that are older than those in the destination, no Merge option will be offered.

The Terminal method is to use a command-line tool called ditto. This is something like using the command cp (to copy items), but it will automatically merge if there are name conflicts.