How I migrated my caldav data (Contacts and Calendars) to Mavericks + Server

Hello,
I write this post to share with you the steps I had to take for correctly migrating my caldav database (containing data for Addressbook and Calendar Server) from a Lion Server to Mavericks with Server version 3.
The problem occured like this : after downloading and installing mavericks (from the Apple Store), and downloading/installing the Server Utility (version 3), everything migrated just fine, except I had an error message during the first launch of the Server utility, but since it eventually launched, and the services were running, I didn't notice anything at first.
But I rapidly saw a big problem : my caldav data was missing. If a client connected to their calendar application, they would get (after syncing with the server) a new empty calendar named "calendar" (this is typical of a fresh empty caldav database). Same for addressbook clients (empty contacts).
So I searched and read several post that helped me greatly :
https://discussions.apple.com/thread/3890595
https://discussions.apple.com/message/23581552
BUT, what is different in mavericks, is this :
The postgres cluster that hosts the caldav data seems to have move (again!), and this is by exploring several config files that I figured which was the right socket to use to connect to the good postgres cluster.
The clues were in the file : /Applications/Server.app/Contents/ServerRoot/private/etc/caldavd/caldavd-apple.p list
Where I found the precious parameter (under the Postgres section) :
<key>SocketDirectory</key>
       <string>/var/run/caldavd/PostgresSocket</string>
What I also figured is that the user account to use for connecting to this postgres cluster is caldav, and not _postgres.
So here are basically the steps I had to take  to reinstall my old database.
Step #0 :
First, you need to locate the dump of the old postgres database, I found that the migration process seemed to make a dump inside :
This method ONLY WORKS if you have the following file :
/Library/Server/Migrated/Library/Server/PostgreSQL/Backup/dumpall.psql.gz
If you have that file, you can extract it with the command :
  gunzip /Library/Server/Migrated/Library/Server/PostgreSQL/Backup/dumpall.psql.gz
For the rest of the steps I assume this file is named  /path/to/your/dump.psql
I think (but I'm not sure of it) that THIS precise dump is different than what you would get inside a manual dump, meaning that in this dump you have all the  databases of the cluster. Again I'm not sure, but that's what I think since there are CREATE DATABASE instructions inside it).
If you don't have that file, perhaps you made a dump by hand.
If that's the case, I think that before Step #3 you will have to create an empty caldav database, BUT, I'm not sure the command "calendarserver_bootstrap_database -v" mentionned here will create the caldav in the right cluster (read above). Perhaps we could figured out together if that's your case.
Step #1 : stop the services
sudo serveradmin stop addressbook
sudo serveradmin stop calendar
Step #2 : drop the caldav database
sudo dropdb -h /var/run/caldavd/PostgresSocket -U caldav caldav
If you get this error message :
dropdb: database removal failed: ERROR:  database "caldav" is being accessed by other users
DETAIL:  There is 1 other session using the database.
then go to Step #2a, otherwise, go straight to Step #3
Step #2a : only if Step 2 didn't work, see above ! (taken from here)
# Connect to the postgres database
psql -h /var/run/caldavd/PostgresSocket -U caldav
# Terminate the current sessions
postgres=> select pg_terminate_backend(procpid) from pg_stat_activity where datname='caldav';
# Exit postgres
               postgres=> \q
Step #3 : if your database dump is not from /Library/Server/Migrated/Library/Server/PostgreSQL/Backup/dumpall.psql.gz, then PERHAPS you will have to create manually an empty caldav database (see Step #0)
Step #4 : create the new database from the dump
sudo psql -h /var/run/caldavd/PostgresSocket -U caldav -f </path/to/your/dump.psql> caldav
A lot of things should be displayed, and I eventually got an error at the end :
psql:DataDump.sql:49844: \connect: FATAL:  database "collab" does not exist
But in my case that didn't affect my migration.
Step #5 : restart services
sudo serveradmin start calendar
sudo serveradmin start addressbook
I hope that helps you.
Cheers

iCloud adds a new (additional) Address book to Outlook, it contains the iCloud contacts, if the iCloud contacts and the Outlook contacts are the same there will be duplicates:
Look in one Contact Folder only
Delete the Outlook Contacts (you can't delete the whole folder, only the contents
These are your choices.

Similar Messages

  • How do i sync my Iphone5 contacts and calendar with PC Windows 8.1

    how do i sync my Iphone5 contacts and calendar with PC Windows 8.1

    http://support.apple.com/kb/ht1386

  • How do I get my IPhone contacts and calendars (Outlook created msg files) to my new Windows 7 LT running Windows Live Mail (free) that doesn't recog. Outlook files??

    How  do I get my Iphone contacts and calendars (Outlook created msg file) to my new Windows 7 LT running Windows Live Mail (free) that doesn't recognize Outlook files??
    Is there a good free converter of msg files to windows live mail file?
    This  is not fun

    Did you try the iPhone syncing options in iTunes?
    Click on your iPhone in iTunes, and check under the Info section where you can choose which app to sync with. Is Windows Live Mail an option?

  • How do I down load my contacts and calendar to my computer?

    How do I down load my contacts and calendar to my computer?

        Hello Craig505,
    What type of computer are you using? Are you trying to transfer your contacts into a certain program? I am here to help.
    Thank you
    KatrinaN
    Please follow us on Twitter @vzwsupport

  • How does manual fetching of google contacts and calendar work?

    In an effort to possibly save some battery life and/or just use the product as intended I would like to know how this works exactly.    At this point I only have two email accounts I use.  Yahoo and GMail, with GMail being my primary account.  Gmail is the only calendar option I use as well.
    I don't add contacts often, nor do I make tons of calendar entrys every day.  So when I look into the settings for mail, contacts and calendar, then fetch new data (which shows push as on, which I want) and then advanced, the only two things listed on the fetch schedule are google calendar and google contacts.  iCloud and Yahoo mail are listed as push.
    So can I set the fetch schedule to manual as opposed to hourly (the longest setting) due to the fact that I am not in constant need or hourly need really of updates to either?  Or will calendar notifications fail to show up on time and all my contacts disappear or something?
    Battery life or not, if I could have both be "push" I would, as it seems counterintuitive not to, but so does manually looking out every hour for changes to something that likely hasn't changed.

    Going to reply to myself on this one, I tryed switching everything to manual fetch today, and at least with respect to contacts, it appears to only go out and sync when the contacts are opening (ie I saw the spinning wheel and watched a contact I had made while in airplane mode on the phone show up online).  So I think that it would work the same for calendar entrys.

  • Any ideas for how to sync to Exchange 2003 - contacts and calendar

    Hi
    I am still searching for a mechanism to give me the sync solution I want, which is as follows:
    At work I have a PC running Outlook 2003 via an Exchange Server 2003 setup.
    At home I have an iMac running Snow Leopard
    In the middle I have an iPhone 3G
    I want to sync Calendar and Contacts across all three machines.
    I want to sync work email between the Exchange server and the iphone, but do NOT need this to sync on my iMac at home
    That's it.
    At the moment I can sync email, calendars and contacts successfully between the Exchange server and iPhone, using the over-the-air Exchange Sync on the iPhone. But sadly my iMac will not sync contacts and calendars to the exchange server 2003 as Snow Leopard only supports exchange 2007.
    Ironically (because I don't need this bit to work) I have managed to get my iMac to sync with my Exchange server EMAIL, by selecting the Exchange IMAP option when setting up the mail account on my iMac (as opposed to the Exchange 2007 option). However, I cannot get iCal or Address book to sync with Exchange 2003, regardless of the options I select when setting up the new accounts in Address book or iCal. I guess these just do not work with Exchange 2003
    I know that I cannot use mobileme as a solution, as you cannot have two over-the-air syncs going on, and I need to maintain my iphone link to the exchange server via activesync
    I also know that using itunes to sync via the cable will not work, as this creates separate contacts and calendar files on the iphone and so does not provide the syncing solution I seek.
    I have tried using google to act as the middle man between my iMac and Exchange server data - getting the iMac to sync to Google Calandar and Google Address Book, and then using a third party piece of software called gsyncit to sync from google to the .ost outlook file on my PC workstation. This works some of the time, but keeps crashing and leaving me with multiple duplicates to have to sort out - much too much hard work on a regular basis.
    So I still do not have a solution. Unfortunately upgrading to Exchange server 2007 is not a solution.....
    Any new ideas out there
    Thanks

    I don't think there will be a solution to this. Exchange 2003 just isn't supported.

  • How to sync bb/outlook/gmail contacts and calendar

    i have a bb 9530 and outlook 2007 running on a 64-bit windows 7 pc.  i use outlook to view my gmail.  i also have the bb gmail app on my phone and that keeps email in sync between gmail servers and the phone as well as outlook since it is setup for an imap account.  so that's all good.
    the problem is that i need to know the best way to keep my contacts and calendar in sync as well.  since i can't "imap" my gmail contacts and calendar, there are 3 different locations to sync for those.
    also, the gmail sync app for outlook has alot of problems on windows 7 and 64-bit vista or 7 so that didn't work either.
    any suggestions would be appreciated.
    thanks...  dave

    I have the same problem.  Did you learn how to solve this?
    Thanks,
    Tracy

  • How can I add my icloud contacts and calendar back to my iphone?

    As of last week, my iCloud contacts and calendar disappeared from my iPhone 4S. I was trying to do something with adding Outlook to my PC to access calendars for my children's school, and now I cannot get my iCloud contacts as a group (tried turning setting off then back on in Settings) and my iCloud calendar doesn't show up (tried turning this off then back on in Settings also - won't add it back) on my iPhone (iCloud account is intact on PC). It's as if iCloud isn't even an option any longer. PLEASE HELP!!

    Hello sstoller,
    It sounds like you now have no iCloud Contacts or Calendar information on your iPhone.
    There are articles for each I'd recommend checking out.
    Get help using iCloud Contacts
    iCloud: Troubleshooting iCloud Calendar
    They both have troubleshooting sections to step through.
    Best regards,
    Nubz

  • How to force a restore of contacts and calendar events from Palm Profile? (and memos and tasks!)

    Yesterday I had to do a partial erase restart of my beloved Palm Pre.  In the past I have had to do full data restorations, and have had no problems at all.  This time, however, my Pre did not recover the dozens of contacts saved in my Palm Profile, nor did it recover any of the Palm Profile calendar events (and all my memos are gone, as well as tasks).  I've tried using the "synch" button in the contacts preferences dialog box, but it did nothing.  Does anyone know if it is possible to "force" a full recovery of your data from the Palm Profile backup, or if there is a way to access that data online somehow?  Much of my contact data I have successfully migrated through seven previous Palm PDAs and phones...it would be too painfully ironic if I've now lost all of that data just because I bought a Palm Pre and trusted the Profile backup system...
    Post relates to: Pre p100eww (Sprint)

    It's 12 am eastern time, and their servers are still down. This is strike 2 for the Palm pre (webOS) for me. 

  • How do I reload all my contacts and calendar items from Outlook to my iPhone

    My iPhone has somehow gotten out of sync with my Outlook calendars and contacts.  It happened when I upgraded to Outlook 2013.  The syncing appears to be working since the last iCloud update to v2.1 but a bunch of stuff that didn't sync when iCloud and Outlook 2013 weren't talking has not synced now that they are.  I think if I could just clear out iCloud, which does match my iPhone, and resync my iPhone, then the iCloud would pick up what is on my phone and everything would match again.
    I would not like to do a factory reset because of the other data that would be lost.
    Thanks,
    Froggie

    Go to Settings>iCloud and turn off Contacts and PhotoStream. Note that will off yo will not be able to add contacts on that iPod.. Also note that with Calendar and Notes are on those items will sync between the two devices.

  • How Do I Get My Exchange Contacts and Calendar to load onto my Q10?

    I have had my Q10 nearly 24 hours now and it has taken a large chunk on this time trying to set it up so that it can replace my old BlackBerry.
    The livelink transfer didnt work and the SIM card is a different size. So I am having to build the phone from scratch.
    I have got my email working, 2 exchange accounts.
    However, I cannot get my contacts or calendar to transfer to the Q10. I use activesync for my exchange emails, which works fine for the email but does not transfer the contacts or calendar.
    Anyone know why this is?
    Solved!
    Go to Solution.

    well, if you want activesync on your Z10, you simply have to configure an ActiveSync account on your Z10, with the proper parameters (usually less than 5 minutes to set everything up).
    the proper parameters must be asked by you to your email provider (in your case, it seems that it is your ISP).
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • When i open system preferences how can i access the mail contacts and calendars as every time i click on it this is what i get (You can't open Mail, Contacts

    Can any one please advise how to fix this problem when i open preferances and go to mail so i can change passwords and so on this is what i get (You can’t open Mail, Contacts & Calendars preferences because it doesn’t work on an Intel-based Mac.) i have to access this to be able to change my emails any help would be appricated thanks.

    OS X Mavericks installed?
    Backup and Reinstall OS X.
    Reinstall Mavericks
    http://support.apple.com/kb/PH13871

  • How can I sync my Ipad contacts and calendars with my Imac? Can I go back to previous OS?

    The main use of our Imac for my OH has been spoilt with the new operating system.  He is getting a message "moving calendars to serveraccount" and it is taking hours to do.  He used to sync easily by cable. 

    iTunes 11 for Mac: Sync contacts, calendars, and other info with iPod, iPhone, or iPad   . If you use OS X Mavericks v.10.9 or later, your contacts, calendars, and other info are updated on your computers and iOS devices via iCloud. For more information, see iCloud Help at icloud.com.
    Instead of reverting to the previous OS X, use iCloud > Learn how to set up iCloud on all your devices.

  • HT201269 HOw to sync my iOS7 iphone contacts and calendar with Windows 8 PC

    I need help syncing my iPhone iOS7 with Windows 8 Outlook on my PC.  Please help

    I have the same problem.  Did you learn how to solve this?
    Thanks,
    Tracy

  • How can I sync outlook 2003 contacts and calendars to icloud?

    I know there is a tool for Outlook 2007 and later, but are there any solutions planned for Outlook 2003??
    I am not on an Exchange server.

    LouisaG wrote:
    You are not alone - it took me two weeks to work out why I could no longer sync my ihpone to my PC and realised it was because Outlook 2003 is not supported.  Outlook 2010 will cost me c£100 - I've already spend a fortune on my iphone and new ipad - why on earth do I have to buy a piece of software I do not need in order to be able to sync my calendar wirelessly?  It is incredibly annoying.  I have tried to sync Outlook 2003 with Google Calendar first - but it just hangs.
    You do need new software, yours won't work, a fact that was available to you when you chose iCloud.

Maybe you are looking for