Google searches for Sync iDisk largely show results that say something along the lines of "just edit the iDisk version." For me, iDisk is more about backup than anything else. I don't really have the need to share Documents with other people, and the local Documents folder of my laptop is always authoritative for my data. However, it would be nice to have a synced and restorable copy of my Documents "in the cloud" in the event my laptop fails. rsync works well for this.
My first step was to log into MobileMe, click the Account link, then to click on Storage Settings. Here I dropped my mail storage from 10Gb to 2Gb and ended up with an 18Gb iDisk, perfect for backing up my critical documents. Next, I wrote up a simple shell script to handle the rsync function and to copy the data from my local Documents folder to my iDisk's Documents folder.
The script is below:
With the script saved and executable, simply run it with ./rsync_idisk.sh. The first run will take quite some time. (iDisk seems to only be giving up about 50Kbps these days, whereas it used to be 250Kbps or better). If you like, open another console and do a tail -f log_name and watch the files sync in real time. Additionally, opening up Finder and drilling in on the Documents folder under your iDisk will show "Syncing iDisk... Item x of x" in the bottom of the Finder window.cat $LOG | mail -s "Output of rsync to iDisk" user@domain.org
For the more advanced, a simple update to the script that would check for access to the internet could be used to only do the rsync if internet access is currently available.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2008071710372562