Q: How to: Recover Wiki after Time Machine restore of OSX 10.8
If you restored your Mountain Lion Server from a Time Machine backup, your Wiki is gone. This is the solution:
1. Extract the file /Library/Server/PostgreSQL For Server Services/Backup/dumpall.psql.gz of your Backup and place it in /tmp/dumpall.psql or elswhere.
2. Run the followning commands:
sudo chown -R _teamsserver:_teamsserver /Library/Server/Wiki/FileData
sudo chmod -R +a "www allow search" /Library/Server/Wiki/FileData
sudo serveradmin stop wiki
sudo serveradmin start postgres_server
cd /Applications/Server.app/Contents/ServerRoot/usr/bin/
sudo ./dropdb -h "/Library/Server/PostgreSQL For Server Services/Socket" -U collab collab
sudo ./createdb -h "/Library/Server/PostgreSQL For Server Services/Socket" -U collab collab
sudo psql -U _postgres -d collab -h "/Library/Server/PostgreSQL For Server Services/socket" -f /tmp/dumpall.psql
3. Done! Restart the Wiki Server
OS X Server, Mountain Lion Server
Posted on Sep 20, 2013 6:35 AM