I had a hell of a time getting CalDAV data to import properly on a Mountain Lion server that didn’t have CalDAV on it originally. Before the upgrade I had two different Xserves, one acting as the OD master running file services, FTP, DNS, Web and Wiki services and the other was a backup computer and iCal server. Here’s what I did in order to get the calendar server working on just one 10.8 server. I could have migrated the server running CalDAV first and configured the other server’s services afterwards but I was curious to know how to do it manually since Apple doesn’t seem to document this anywhere. I’m sure there is a better way but this method worked for me.
First I made a Time Machine backup of the server running the CalDAV server. Next I set up a fresh install of 10.8 and installed the Server.app but did not run it. I then ran the Migration Assistant and brought over the data from the Time Machine backup of the server. When it was done, I had a directory at /Library/Server/Previous containing the necessary configuration data from the old server. I’m not sure if this was necessary but I went into this folder and deleted everything that wasn’t related to CalDAV to prevent potential import problems.
Once I had my primary server migrated and ready to go I copied the /Library/Server/Previous folder to the same location on the primary server. From the terminal I went to /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/MigrationExtras/ and ran python 70_calendarmigrator.py –targetRoot / –sourceType System –language en –sourceRoot /Library/Server/Previous/ –sourceVersion 10.6.8 –purge 0
After launching the calender server, give it plenty of time to move the data to postgres before trying to connect in iCal. Once it finished I finally had all of my calendar data from the other server combined with the primary server.
One thing that I suppose might work is recreating the folder structure and populating directories with the appropriate configuration and data files in the same way that the Migration Utility does. It would certainly be much faster. You’d create a directory at /Library/Server/Previous/Library on the new server and copy the old server’s CalendarServer directory from /Library to it. Next would be to create a directory at /Library/Server/Previous/private/etc/caldavd and populate it with the caldavd.plist from /etc on the old server. You may also want to edit the original caldavd.plist prior to running the migration script so that the server name matches your new server.
I think that would do it. If I’m missing any other required files for the Caldav migration, let me know.