Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ML Server Wiki Migration to Yosemite Server

Hello All!


I am running an Mountain Lion Server. The server was migrated from 10.6 server to 10.7 server and finally to 10.8 server.

It runs some services: DNS, Web, Wiki, Caching, Calendar, Contacts, File Sharing, VPN, Profile Manager. The server is an Open Directory Master.


I tried several times to upgrade to Mavericks and now to Ysemite Server - but without success. After the upgarde the, Profile manager was broken ("Error reading Configuration") and the Wikis where not accessible anymore. I followed strickly the migration guide - but no success.

Therefor I set up a new, clean Yosemite Server on an spare disk. The only data I must to migrate to the new installation are the Wiki pages of the ML Server.


So my question is: Is there a procedure to manually migrate Wiki content from Mountain Lion Server to Yosemite Server? That would be vry helpful.

I searched the web, but only found guides to migrate Snow Leopard Wikis to newer servers.


Thx & Best Regards,

Ralf

Posted on Apr 18, 2015 1:05 AM

Reply
6 replies

Apr 19, 2015 8:37 PM in response to MacRabbitPro

I have a similar problem, and have gotten as far as needing to know the default superuser for postgresql, or how to create one.


I had a 10.8.5 system with what I assume to be a 2.x version of Server.app on a 2010 Mac Mini Server (originally 10.6). The system hard drive went bad. I initially restored form Time Machine onto a new drive, but found there were some other recurring issues in the system log. Wanting to upgrade anyways, I installed 10.10 on the new hard drive and attempted to recover data from Time Machine. I have restored everything I was looking for, with the exception of Wikis.


I have a dumpall.psql.gz file that appears to be a good backup, as well as the /Library/Server/WIki/FileData still in Time Machine. This post helped me find the new postgresql instance: Yosemite Server - postgres not running


However, the only role that I can find on this instance is _devicemgr, and I don't see any helpful existing schemas:


postgres-> \dg+

List of roles

Role name | Attributes | Member of | Description

------------+------------+-----------+-------------

_devicemgr | Create DB | {} |

postgres-> \dnS+

List of schemas

Name | Owner | Access privileges | Description

--------------------+------------+--------------------------+------------------- ---------------

information_schema | _devicemgr | _devicemgr=UC/_devicemgr+|

| | =U/_devicemgr |

pg_catalog | _devicemgr | _devicemgr=UC/_devicemgr+| system catalog schema

| | =U/_devicemgr |

pg_temp_1 | _devicemgr | |

pg_toast | _devicemgr | | reserved schema for TOAST tables

pg_toast_temp_1 | _devicemgr | |

public | _devicemgr | _devicemgr=UC/_devicemgr+| standard public schema

| | =UC/_devicemgr |

(6 rows)


So, my attempts to import look like:


> sudo psql -U _devicemgr -d postgres -f ~/Desktop/dumpall.psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL

SET

SET

psql:/Users/dwalin/Desktop/dumpall.psql:12: ERROR: permission denied to create role

psql:/Users/dwalin/Desktop/dumpall.psql:13: ERROR: must be superuser to alter superusers

psql:/Users/dwalin/Desktop/dumpall.psql:14: ERROR: permission denied to create role

psql:/Users/dwalin/Desktop/dumpall.psql:15: ERROR: role "_postgres" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:16: ERROR: permission denied to create role

psql:/Users/dwalin/Desktop/dumpall.psql:17: ERROR: role "caldav" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:18: ERROR: permission denied to create role

psql:/Users/dwalin/Desktop/dumpall.psql:19: ERROR: role "collab" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:20: ERROR: permission denied to create role

psql:/Users/dwalin/Desktop/dumpall.psql:21: ERROR: role "webauth" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:32: ERROR: role "caldav" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:33: ERROR: role "collab" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:34: ERROR: database "collab" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:35: ERROR: database "device_management" already exists

REVOKE

psql:/Users/dwalin/Desktop/dumpall.psql:37: ERROR: role "_postgres" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:38: ERROR: role "_postgres" does not exist

GRANT

psql:/Users/dwalin/Desktop/dumpall.psql:40: ERROR: role "webauth" does not exist

psql:/Users/dwalin/Desktop/dumpall.psql:43: \connect: FATAL: database "caldav" does not exist

Apr 20, 2015 12:33 AM in response to goochrules

Replying to my own post...


The socket at /Library/Server/ProfileManager/Config/var/PostgreSQL was a dead-end... the correct socket to use is /Library/Server/Wiki/PostgreSQL.


In the end I was able to restore my wikis by:

- install Server.app 4.1 and start it up

- turn on Websites and WIki

- quit Server.app

- open a postgresql terminal:

> sudo psql -U collab -d postgres -h /Library/Server/Wiki/PostgresSocket

- disconnect any other users:

postgres> select pid from pg_stat_activity where pid <> pg_backend_pid();

postgres> select pg_terminate_backend(...);

- delete existing databases

postgres> drop database collab;

postgres> drop database caldav;

postgres> drop database device_management;

postgres> drop database webauth;

- quit postgres

postgres> \q

- import from Time Machine captured backup

> sudo psql -U collab -d postgres -f ~/Desktop/dumpall.psql -h /Library/Server/Wiki/PostgresSocket

- remove special file so that Server.app will re-initialize and update the Wikis

> sudo rm /var/db/.ServerSetupDone

- Log into the wiki as the server admin (the one created during OS X 10.10 install) and reset wiki permissions

ML Server Wiki Migration to Yosemite Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.