OS X Server: Migrating and copying wiki data from Lion Server
Learn how to migrate Wiki data from a Lion Server to an OS X Server.
Important: This process will replace all of the wiki data currently in the OS X Server with the data being migrated from the Lion Server.
Migrating wiki data from Lion Server to OS X Server
- On the Lion 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 Lion Server to /tmp/collab.pgdump on the OS X Server, then copy the contents of /Library/Server/Wiki/FileData on the Lion Server to /Library/Server/Wiki/FileData on the OS X Server.
- Log in to the OS X Server as an administrator and execute the following commands in Terminal. These commands ensure correct ownership and permissions, start the Postgres database, populate it with the data dumped from the source server, and start up the wiki service:
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 -u _postgres ./pg_restore -h "/Library/Server/PostgreSQL For Server Services/Socket" -d collab -U collab --single-transaction /tmp/collab.pgdump sudo serveradmin start wiki
Note: Migrating wikis does not migrate users or groups. These instructions are intended for use when a new OS X Server is bound to the same directory server as the Lion Server, the users and groups have been migrated from the Lion Server, or the users and groups have been recreated on OS X Server.