12 Replies Latest reply: Feb 6, 2012 6:43 AM by Brian Brumfield
bobgeo Level 1 Level 1 (25 points)

We are running Lion Server for a while now. In three instances, we have created either new Wikis or pages within a Wiki. We have saved it and folks have been able to view it. Then, each time, something happens to the server since folks cannot get ichat to work and/or cannot connect to network shares; so we restart the server.

 

After restart, the Wiki data is not there, it has disappeared and needs to be re-created.

 

I have a feeling that Time Machine is corrupting afp or open directory which leads to these problems, but that is just a gut feel since we were having problems with Time Machine client reliability before Lion.

 

Still, Wiki data is gone and does not appear, even after a couple of restarts of the server; it must be re-created. Anybody else seeing this?

  • Brian Brumfield Level 1 Level 1 (130 points)

    I stumbled across this article last week:

    http://stackoverflow.com/questions/6950395/postgresql-server-wouldnt-shutdown-on -lion-mac-os-10-7

     

    And while he was dealing with a pre-release Lion, his symptoms are similar.

     

    Check your /var directory for these recover folders:

     

    /var:

    pgsql.pre-restore-2011-07-30_17:35:22_EDT

    pgsql.pre-restore-2011-07-31_19:07:21_EDT

    pgsql.pre-restore-2011-08-28_10:06:17_EDT

    pgsql.pre-restore-2011-08-28_19:29:22_EDT

     

    I was able to stop postgres, rename the existing /var/pgsql folder, and then rename the most recent 'pre-restore' folder to pgsql and restart postgres and everything was there.

     

    Why this is happenging - seems like postgres is not being shut down gracefully and this is how it deals with it.

     

    More importantly for me, is how to recover data from these old directories - to merge all the content that has been lost to them.

     

    Ugh!

  • yizhi Level 1 Level 1 (0 points)

    We bought a new Mac mini server running Lion server, specifically for the Wiki purpose. We migrated from 10.5.8 Leopard server wiki, everything went fine, people were able to add new wiki pages and all that. However, after a reboot, the wiki DISAPPEARED!!!

     

    We repeated the process twice, and the wiki disappeared after reboot. Basically we lost 2 days' work, and for a research lab like our size, this is very costly. I called up Apple enterprise support, and they contacted their Engineering team and told me that they are aware of this issue, but they could not fix it at the moment. I will have to wait until an update from Apple to fix this serious problem (at least for us). Before then, I am advised to keep using the Leopard server but not the Lion server.

     

    I am shocked to learn all of these, as we have been using Apple products for years, and this is a very pleasant experience. Now my colleagues started worrying about their data security and the reliability of the Lion server.

     

    This is my first post in the Apple forum, and I hope this is helpful for you guys.

     

    Patrick

  • bobgeo Level 1 Level 1 (25 points)

    Are you running 10.7.2?

     

    Also, you should be running SuperDuper for now, it would like make it easier to put the database back. Perhaps you are running time machine and you could replace out the files, or make the system running as it was before the reboot.

     

    Bob

  • yizhi Level 1 Level 1 (0 points)

    Hi Bob,

     

    Yes I am running 10.7.2, in fact we just got this server a few days ago. I am not sure about SuperDuper, could you elaborate a bit?

     

    We are also running Time Machine. But I am not sure which folder we should restore. In the 10.5 and 10.6, there is a folder /Library/Collaborations which contains all the wiki files, but no longer exists in 10.7 server. Could you pelase also educate me on this too?

     

    In any cases, I feel bad if I need to recover the wiki like this..

     

    Patrick

  • bobgeo Level 1 Level 1 (25 points)

    Well, that is a major bummer that they know about it, I was hopeful it was fixed in 10.7.2.

     

    Super-Duper is a superb back-up utility that takes a complete snapshot of the drive at intervals you set. Perhaps for now, you can set it at every night, or run it before a reboot. If the data is gone, you can easily restore the entire drive, quickly.

     

    So, to get you up and running, download a widget from apple's site that allows you to see hidden folders. It makes it easy to toggle hidden folders on and off. Just search "apple hidden file widget" and follow the link. The company / author is "Matt Hansen" and it is free.

     

    Then, install the widget and activate it so you can see the hidden folders. You will now see the /var directory that Brian mentions above. While in that folder, you could replace out particular folders or files with the time machine copies. Maybe replace out all of the pgsql folders? I am not totally sure on that, but that is what I would do.

     

    Giant caveat - I would run Super Duper beforehand, so that if you mess up some integral file, you can quickly and easily just make the drive like it was before you start restoring things.

     

    When done, remember to go back to the widgets and turn off "show hidden file" so you cannot see them anymore.

     

    Let us know what you end up doing so as to help others who may get hit with this. Also, as you may know, 10.7.3 is supposedly close to being released, so I have my fingers crossed that it will solve this issue.

     

    Bob

  • pedro anisio Level 1 Level 1 (0 points)

    Thanks for the tip, I have lost part of the contents of my Wiki, but I was able to restore it by moving the latest directory "pre-restore" for pgsql.

     

     

    But in fact, is of great concern this type of failure occurring in an area as sensitive as this.

  • Brian Brumfield Level 1 Level 1 (130 points)

    Pedro-

    Glad it worked for you. It happens to me all the time. I've lost count. If you're like me, before long you will be able to spot the key symptoms quickly, check /var and get everything renamed and restarted before you go down a path of creating new data. I've found that I get everything back.

     

    It's insanity, because something is fundamentally broken with the Postgres implementation and I am ashamed at Apple over this. I regret having installed Lion Server, and I am repeatedly disappointed that it hasn't been fixed. How exactly is this acceptable? :-/

     

    Best of luck to you!

  • Brian Brumfield Level 1 Level 1 (130 points)

    Pedro-

     

    One more thing. Whenever this happens, check your /etc directory too. I've found that 9 times out of 10, when there is a /var postgres "before-restore" folder, there is also an /etc/apache2.before-restore... folder and an /etc/certificates.before-restore... folder. The same remedy applies. You just have to stop apache and certificates services before moving the folders around.

     

    # serveradmin stop certs

     

    and

     

    # serveradmin stop web

     

    Shuffle folders, and then restart all the stopped services. Seems to work to recover without anything but the extra hassle.

  • yizhi Level 1 Level 1 (0 points)

    I definitely think Apple should recall this horriable products. I have been wasting my time searching for solution for this, but there is none!

  • pedro anisio Level 1 Level 1 (0 points)

    This just happen again when I restared my server (updating to 10.7.3). Again I had to move the directories and restart the wiki.  Thats real BAD

  • bobgeo Level 1 Level 1 (25 points)

    Hi Pedro,

     

    The update to 10.7.3 (I think) does not really occur until after that startup. Or, perhaps if the wiki database setting was already corrupted or not stopped; the update would not address that until the next time you restart; again, just surmising that.

     

    So, my plan is to now put in a few test entries and do some restarts (after hours) to see if I can recreate the issue. My hope is that 10.7.3 has fixed this problem; but alas, I did not see anything in the documentation that would state that.

     

    However, 10.7.3 did fix a Xerox printing driver error we were getting that Xerox said was a fix Apple was working on. So, stuff got fixed that they might not mention, as it did with this printer issue we were having.

     

    Anyway, I would recommend doing some testing on it with (test) entries and the like. I am not sure how else we can tell if it was fixed?

     

    Bob

  • Brian Brumfield Level 1 Level 1 (130 points)

    I upgraded and after the requisite restart, nothing was broken. Knocking on wood. I would *LOVE* to put this chapter of OS X Server behind me.