-1

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.

Magellan
  • 4,451
  • 3
  • 30
  • 53
Claus
  • 121
  • 3
  • Why not just back up the whole system, which is the only sensible thing to do? – John Gardeniers Aug 06 '12 at 00: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 06 '12 at 01: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 06 '12 at 05:25

1 Answers1

2

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.

Florian Bidabé
  • 334
  • 3
  • 10