Skip to content

Instantly share code, notes, and snippets.

View Tiggar's full-sized avatar

Jan Brückmann Tiggar

View GitHub Profile
@Tiggar
Tiggar / README.md
Last active August 29, 2015 14:10 — forked from nschum/README.md

OS X Yosemite Messages database merger

Early betas of OS X Yosemite had a bug where the library of old messages wasn't migrated. Instead a new library was created and all old messages were gone.

The bug has been fixed, but if you were affected, you still have two separate libraries. This script merged them for me. Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

This is what your ~/Library/Messages folder will look like if you're affected:

  • chat.db
exit - leaves root
umount /Volumes/TMBackup
"disk1" unmounted.
"disk1" ejected.
iahonair:~ root# hdiutil detach /dev/disk1s2
journal_replay(/dev/disk1s2) returned 0
** /dev/rdisk1s2
Using cacheBlockSize=32K cacheTotalBlock=1024 cacheSize=32768K.
Executing fsck_hfs (version diskdev_cmds-557~393).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Time Machine Backups
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
iahonair:~ root# fsck_hfs -drfy -c 750 /dev/disk1s2
** Checking volume information.
** The volume Time Machine Backups was repaired successfully.
CheckHFS returned 0, fsmodified = 1
/dev/rdisk5s2: fsck_hfs run at Thu Mar 7 16:56:29 2013
/dev/rdisk5s2: journal_replay(/dev/disk5s2) returned 0
/dev/rdisk5s2: ** /dev/rdisk5s2
/dev/rdisk5s2: Executing fsck_hfs (version diskdev_cmds-557~393).
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Time Machine Backups
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
/dev/rdisk5s2: fsck_hfs run at Thu Mar 7 16:55:02 2013
/dev/rdisk5s2: ** /dev/rdisk5s2 (NO WRITE)
/dev/rdisk5s2: Executing fsck_hfs (version diskdev_cmds-557~393).
QUICKCHECK ONLY; FILESYSTEM CLEAN
tail -f /var/log/fsck_hfs.log