Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Where are the calendar files stored on OS X (mountain lion) Server Calendar Service?

My users use the native Calendar service and I need to back this data up.

share|improve this question
    
Why not just back up the whole system, which is the only sensible thing to do? –  John Gardeniers Aug 6 '12 at 0:52
    
What calendar files? Like mail calendars? Are you sure they are on the server, and not stored client-side? I honestly don't know for sure myself, but maybe a detail or two like what mail server or calendaring program you're running would be helpful. –  HopelessN00b Aug 6 '12 at 1:07
    
I mean calendar files of the calendar service on os x server. Every user that has been logged in in the past should have at least one such calendar file. I guess, yes, I could (and have) backed up the entire system, but even on the backup it'd be interesting to know where the calendar files of the users are. –  Claus Aug 6 '12 at 5:25

1 Answer 1

If you've enabled the Calendar service, by definition, collaborative user data are stored in the server PostGreSQL database.

You can access it by different way (network, socket), if you're looking to back this up, with Lion you could type in the Terminal :

  • To backup everything : $ pg_dumpall -U _postgres > /PostgreSQL_Backup/dump_all.psql
  • Calendars only : pg_dump -U _postgres caldav -c -f /PostgreSQL_Backup/caldav.sql

  • to Delete : dropdb -U _postgres caldav

  • to restore : psql -U _postgres -d collab -f /PostgreSQL_Backup/caldav.sql

With Mountain Lion, it seems PostGreSQL connection is slightly different, or the database table may have been renamed.

To have a basic understanding of how it works, you should explore pgsql database with a software like Navicat PostGreSQL or PgAdmin. Before editing pgsql, you should seriously consider to make a full backup of your server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.