Portland, Oregon

Phone 828.549.8447
Email [email protected]

I've been looking into this for a while, and since it wasn't straightforward to find at all, I figured I'd post this so that I can simplify life for anyone else looking for this information.

Essentially, I've been looking for a way to back up Address Book Server and iCal Server data to an external drive (a Drobo). The problem is, after hours of searching, I could not find where those services stored their data. In Snow Leopard Server 10.6, they were stored in /Library/AddressBookServer/ and /Library/CalendarServer/. Well, as of Lion, that's no longer true. Similar directories can be found under /Library/Server/Calendar and Contacts/, but upon further inspection, those too were mostly empty.

So where is the data stored?

PostgreSQL. It's new to Lion, and there isn't much information on it, but upon further inspection, Lion is indeed storing all of the contacts and calendars inside the database. Since it's also not yet straightforward how to connect to the database if you want to backup this information (my original purpose), here's how:

  1. Open up the Terminal and type:

    sudo nano /System/Library/LaunchDaemons/org.postgresql.postgres.plist
    
  2. Look for:

    listen_addresses=
    

    And change it to:

    listen_addresses=127.0.0.1
    

    For those not familiar with nano, save by hitting Control-O and exit by hitting Control-X.

  3. Finally, restart PostgreSQL:

    sudo serveradmin stop postgres
    sudo serveradmin start postgres
    
  4. You can now login using whichever method (pgAdmin, for example) with the following credentials:

    Username: _postgres

    Password: the original administrator's password (if you are the system administrator, it will be your password.)

Done! I hope that helps someone down the line.

Comments

There are no comments made so far.

Make a comment

Text is formatted with Markdown.