Q: how do you migrate wiki server from one ML server to another
My installation of ML server has gone a bit funny, profile manager isn't working properly so I have done another fresh install, but I would like to transfer the wiki server across.
I have tried using apples support doc http://support.apple.com/kb/HT5082 :
Copying all wikis from one OS X server to another
- On the source OS X server, perform this command in Terminal as an administrator in order to dump the Postgres database to a file:sudo pg_dump --format=c --compress=9 --blobs --username=collab --file=/tmp/collab.pgdump collab
- Copy /tmp/collab.pgdump from the source server to /tmp/collab.pgdump on the destination server, then copy the contents of /Library/Server/Wiki/FileData on the source server to /Library/Server/Wiki/FileData on the destination server.
- Log in to the destination server as an administrator and execute the following commands in Terminal to ensure correct ownership and permissions, start the Postgres database, populate it with the data dumped from the source server, and finally start up the wiki service:
sudo chown -R _teamsserver:_teamsserver /Library/Server/Wiki/FileData
sudo chmod -R +a "www allow read" /Library/Server/Wiki/FileData
sudo serveradmin stop wiki
sudo serveradmin start postgres
sudo rake -f /usr/share/collabd/server/Rakefile db:drop
sudo createuser -U _postgres -d -s collab
sudo createdb -U collab collab
sudo -u _postgres pg_restore -d collab -U collab --single-transaction /tmp/collab.pgdump
sudo serveradmin start wiki
Seems to work untill you get to the part which wipes the current database:
sudo rake -f /usr/share/collabd/server/Rakefile db:drop
which throws an error message, so does anyone know the correct proceedure for ML
Posted on Aug 3, 2012 12:14 AM
A lot of these commands were shifted inside /Applications/Server.app/Contents/ServerRoot now to make it more self-contained. I couldn't find that exact path, but there is this file:
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/coreclient/Rakefi le
But I'm not familiar enough with Ruby.
Regardless, it seems like you just need to drop the database since in the next two steps you're creating the db and user again. I'd just run:
sudo dropdb -U _postgres collab
Warning: This command does delete the wiki database.
Posted on Aug 3, 2012 5:04 AM