Use iDisk to synchronize IM Chat Logs
Like email, my IM chat logs have become a critical reference and database for me. With both OS X’ spotlight and Adium’s chat transcripts, searching for a conversation in these logs is quite easy. However, not so much so when I’m on my laptop at home, and the chat took place on my work computer. I am looking into services like simkl.com, which act as a proxy and store your chat logs an their servers – but, these don’t have the search interface I’m used to, and I’m not sure I’m ready for yet another company to have access to my personal communications.
So, here’s the procedure I am using to sync my logs using my iDisk included with my MobileMe subscription. It is pretty rudimentary, but works nicely for what I want it to do.
Here are the relevant references I used when putting this process together, as I didn’t feel like spending much time on this:
http://www.macosxhints.com/article.php?story=2008071710372562
http://www.macosxhints.com/article.php?story=20020207214002198&query=dd
http://forums.macosxhints.com/showthread.php?t=2185
http://www.bombich.com/mactips/rsync.html
http://lingon.sourceforge.net/
First, I built the latest rsync based on the link above – not that its really needed, but I figured it wasn’t a bad idea to have the latest, greatest, and most efficient.
Second, you need the actual script, here’s mine, with some names removed:
#!/bin/bash
# Sync all data from Chat logs to MobileMe iDisk
export LOG=/Users/myname/idisk.log
rm -f $LOG
echo `date` > $LOG
echo "Starting copy of Adium Chat History to iDisk..." >> $LOG
export IDISK=/Users/myname/idiskmount
export PWFILE=/Users/myname/bin/idiskpw.txt
cat $PWFILE | mount_webdav -a0 http://idisk.mac.com/dotmacusername/ $IDISK
rsync -a -E -4 -u --exclude=.DS_Store --stats --progress /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ ${IDISK}/ChatLog/ >> $LOG
rsync -a -E -4 -u --exclude=.DS_Store --stats --progress ${IDISK}/ChatLog/ /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ >> $LOG
umount $IDISK
echo "Backup of Chat Logs to iDisk complete..." >> $LOG
echo "" >> $LOG
echo `date` >> $LOG
exit 0
Now, I created a new job in Lingon to run the sync script. I named it com.myname.idisk.rsync, selected the script I had created (saved in ~/bin), and set it to run every 2 hours. After logging out and back in, everything was up and running. Status can be checked in the log file – after a long initial run, things run very quickly.
You’ll want to repeat this process on any other computer you have for it to work properly. After spotlight reads in all the new files, you should have searchable chat logs on all your macs.
Notes: You’ll need to create the appropriate directories here (idiskmount), and the funky webdav password file. This process is detailed in the macosxhints forum post, it involves typing a few non-std characters in your editor of choice.
2 responses so far








Have you consider just sym link the chatlog directory to idisk.
I don’t want to have to wait to write to my slow idisk while I’m chatting, I just want it synced up every once in a while.