Currently Being ModeratedSep 3, 2011 6:13 AM (in response to bobgeo)
I stumbled across this article last week:
And while he was dealing with a pre-release Lion, his symptoms are similar.
Check your /var directory for these recover folders:
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.
Currently Being ModeratedDec 22, 2011 12:24 PM (in response to Brian Brumfield)
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.
Currently Being ModeratedDec 22, 2011 12:47 PM (in response to yizhi)
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.
Currently Being ModeratedDec 22, 2011 12:53 PM (in response to bobgeo)
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..
Currently Being ModeratedDec 22, 2011 1:13 PM (in response to yizhi)
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.
Currently Being ModeratedDec 23, 2011 3:45 AM (in response to Brian Brumfield)
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.
Currently Being ModeratedDec 23, 2011 6:50 AM (in response to pedro anisio)
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!
Currently Being ModeratedDec 23, 2011 7:26 AM (in response to pedro anisio)
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
# serveradmin stop web
Shuffle folders, and then restart all the stopped services. Seems to work to recover without anything but the extra hassle.
Currently Being ModeratedFeb 3, 2012 7:23 AM (in response to pedro anisio)
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?