[CalendarServer-users] Backing up Calendar Server Data in OS X Server 10.9.1 (server app v3.0.2)

Paul E Roche roche at chapman.com
Thu Feb 6 12:47:15 PST 2014


I've had a little more time to investigate: 

It seems that in 10.9 server it expects to find the socket info for Calendar Server here: 

/Library/Server/PostgreSQL For Server Services/Socket

But if you look at /var/run/caldavd - you can find the real path to the socket under a dir called ccs_postgres_* 
or you can grep for it to find it: 

bash-3.2#  netstat -a | grep caldavd | more

 bb1d67b768bce67 stream      0      0                0  bb1d67b7593b30f                0                0 /var/run/caldavd/ccs_postgres_3d403b3009fe0c830944d87bd751fbe9/.s.PGSQL.5432

If you create a symlink to that directory under /var/run/caldavd/ at /Library/Server/PostgreSQL For Server Services/Socket then the backup command appears to work.

example of making the symlink: 

cd /Library/Server/"PostgreSQL For Server Services"
mv Socket not_socket
ln -s /var/run/caldavd/ccs_postgres_3d403b3009fe0c830944d87bd751fbe9 Socket

then run the backup command: 

bash-3.2#  /Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_backup backup /tmp/caldata.tgz

bash-3.2# cd /tmp
bash-3.2# du -sh * 
112M	caldata.tgz

Not sure what files would have to be adjusted in OS X server so that you don't have to create that symlink for the command to work.

I also don't know if this will adversely affect the server in some other ways - I am still just experimenting right now - but so far it still seems to be running OK - I have stopped and started the server since adding the symlink and my test clients can still connect and edit events. Look forward to hearing from anyone else runnng on 10.9.

Paul 


> Message: 1
> Date: Wed, 5 Feb 2014 10:59:34 +0000 (UTC)
> From: Max <max at pharmazie-bonn.de>
> To: calendarserver-users at lists.macosforge.org
> Subject: Re: [CalendarServer-users] Backing up Calendar Server Data in
> 	OS X	Server 10.9.1 (server app v3.0.2)
> Message-ID: <loom.20140205T115727-254 at post.gmane.org>
> Content-Type: text/plain; charset=us-ascii
> 
> Hey Paul, 
> hey all,
> 
> I'm having the same issue: I want to migrate the calendar and contacts data. 
> When trying to backup with "calendarserver_backup backup file.tgz" it says 
> "pg_dump: [archiver (db)] connection to database "caldav" failed: could not 
> connect to server: No such file or directory"
> 
> Just wondering, did you manage to sort this out?
> 
> Thanks a lot for your help!
> 
> Max
> 


More information about the calendarserver-users mailing list