Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Wiki migration issues to OSX Server Mavericks

Hello,



I'm trying to migrate a wiki from OSX Server Mountain Lion to OSX Server Mavericks and can not. I tried to WikiAdmin migrate and pg_dump and the two methods I have failed.



Has anyone managed to do it? In my case OSX Server Mountain Lion and OSX Server Mavericks are on different computers.



thank you very much

OSX Server-OTHER, OS X Mavericks (10.9), Wiki Service

Posted on Oct 23, 2013 2:49 PM

Reply
23 replies

Oct 23, 2013 3:32 PM in response to llferrer

I guess Apple have to update their wiki migration directions in http://support.apple.com/kb/HT5082, because it didn't work for me either. I was able to migrate Wiki Server from a 10.8 Server by using Migration Assistant. But you have to physically connect the two machines (e.g. boot the 10.8 Server into target mode).

After migration install Server.app on the Mavericks Server and on initial start it will put your wiki into place.

Oct 28, 2013 8:58 AM in response to llferrer

I got this to work to backup my wiki on OSX 3.0 - I was previously using apple's instructions from http://support.apple.com/kb/HT5082


but was getting errors - as below.


./pg_dump -h "/Library/Server/PostgreSQL For Server Services/Socket" --format=c --compress=9 --blobs --username=collab --file=/tmp/collab.pgdump collab

pg_dump: [archiver (db)] connection to database "collab" failed: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?


When I went to look, I didn't see any s.PGSQL.5432 file in the directory /Library/Server/PostgreSQL For Server Services/Socket/


So, I looked around for one and found one at

/Library/Server/Wiki/PostgresSocket/.s.PGSQL.5432


That sounded promising and when I changed to the command to:


./pg_dump -h "/Library/Server/Wiki/PostgresSocket" --format=c --compress=9 --blobs --username=collab --file=/tmp/collab.pgdump collab


All was well, and the /tmp/collab/pgdump file was properly dumped.


Now on to restoring it to what I really want in there...


probably need to modify the other instructions as well.

Oct 28, 2013 2:33 PM in response to nfranzmeier

Hi nfranzmeier,


I tried with ...


./pg_dump -h "/Library/Server/Wiki/PostgresSocket" --format=c --compress=9 --blobs --username=collab --file=/tmp/collab.pgdump collab


... but i received this error ...


pg_dump: [archiver (db)] connection to database "collab" failed: could not connect to server: Permission denied

Is the server running locally and accepting

connections on Unix domain socket "/Library/Server/Wiki/PostgresSocket/.s.PGSQL.5432"?


😟

Oct 28, 2013 6:12 PM in response to llferrer

Sorry, you probably need to do a sudo before the command. I was root when I did it.


Update: After successfully exporting it, I verified you can delete the wiki it like this:


1. sudo su (or just run the next command with sudo)


2. psql -h "/Library/Server/Wiki/PostgresSocket" -U collab template1


3. Enter the following which will delete users that are attached, delete and recreate the DB


template1=# SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'collab' AND pid <> pg_backend_pid();drop database "collab";create database "collab";


(Past the part starting with SELECT to the end into the psql session.


Note: Sometimes I had to execute this twice because there are processes trying to reattach to the db while you are doing this...


\q to quit


4. Then you can import your backup with (again with sudo or as root)


pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /tmp/collab.pgdump


or if you did a pg_dump with text you can do something like


psql -h "/Library/Server/Wiki/PostgresSocket" -U collab -d 'collab' -f /tmp/collab.pgdump.sql


In the end, however, I found that the schemas and users are different between mountain lion with OSX server 2.2 and OSX server 3.0 so I haven't been successful in migrating from a different mountain lion server to a maverick server. I played around with adding the missing views, changing "_postgres' to _teamsserver etc. in a text dump, but although it was successful on import and starting the wiki, there were too many issues to proceed.


Probably going to duplicate the disk on the Mountain Lion server to a USB disk, upgrade the USB disk to OSX maverick, OSX server 3.0 and then export the DB using the above. Then just boot off my original mountain lion disk. Alot of work but I'm out of ideas.


I did verify that I can export and reimport the same DB on the same OSX 3.0 server, so this method probably works between OSX 3.0 machines....


Maybe Apple will be nice enough to post the migration scripts they use when upgrading. That part worked ok for a prexisting wiki....






Oct 29, 2013 2:44 PM in response to llferrer

Hello, I explain what I tried to do,



I installed VMWare Fusion 6 and Mountain Lion and I installed OSX Server 2.2.2. Then I copied my wikis and everything worked properly.



Then I installed and immediately Mavericks and OSX Server 3.0, and I got 'Error enable server management' that I have solved through this link https://discussions.apple.com/thread/5477014



I reinstalled OSX Server 3.0 and this time it installed correctly, but when connecting to the wiki I get the following message in Safari:



Caught exception "Error executing query [SELECT" _inner_entity. " ...blablabla ....



And here I am blocked.

Nov 5, 2013 9:12 AM in response to llferrer

Hi,


I can report a successful set of steps to migrate (using a combination of the above advices),by

-upgradingthe ML instance to Mavericks

-importingthe new DB andcopyingthe wiki files to the new Clean Mavericks instance.


Full detailed steps as follows:


1. Installed Mavericks

1.1 Installed Server app


2. Copied the Mountain Lion partition using Carbon Copy app

2.1 Upgraded to Mavericks using the App Store Installer

2.2 Upgraded the Server app(from 2.2.2 to 3.0)

2.3 Saved the upgrade wiki db ...

sudo mkdir /Volumes/Mavericks/temp

sudo /pg_dump -h "/Library/Server/Wiki/PostgresSocket" --format=c --compress=9 --blobs --username=collab --file=/Volumes/Mavericks/temp/collab.pgdump collab

(note I did not use the tmp folder as point-ing to a local private/tmp...)

In Mavericks(1.):

3. Copied the Wiki folder from Lion(I assume I would work also with the files from after point 2.2)

3.1 Assigned user right as per official instructions http://support.apple.com/kb/HT5082:

sudo chown -R _teamsserver:_teamsserver /Library/Server/Wiki/FileData

sudo chmod -R +a "www allow read" /Library/Server/Wiki/FileData

3.2 Imported updgraded db:

pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /temp/collab.pgdump


(the only other errors or extra steps I did on the clean Server was to give access to _www to the Web folder, as the home page/wiki page could not be browser accessed otherwise)

(note also that the ML wiki was a Lion migrated wiki(using pgdump) with a bug that was opening 2 pages for every hyperlink click)


[nowlooking on how to importtheAddressbook, as apparently Icannotdrag and drop contacts in the Carddav account]


Hope it help, else please try to follow closely the 2 overall principles bullet pointed at the beginning of my post,

Bogdan.

Nov 5, 2013 10:21 AM in response to capitanu

When upgrading to Mavericks server from Mountain Lion server all the wikis disappear for me. I've done a full wipe and reinstall, restore from Time Machine, migration assistant. It always happen. Anyone know why?


Your instructions say to backup the database from Server 3 wiki, but that assumes the wiki's upgraded properly right? So in my case it would do no good to backup the database.


Could use some advice here.

Nov 28, 2013 11:00 AM in response to capitanu

Thanks for posting the excellent info! That was a huge help when I migrated Wiki pages from existing Mavericks Server to a new Mavericks Server instance.


I was having problems with the final pg_restore having errors (something about a type already existing), but it seemed a little inconsequential to me. So, I removed the "--single-transaction" option on the pg_restore, ignored the resulting warnings, and now the old Wiki pages are available on the new Mavericks server.

May 2, 2014 9:42 PM in response to llferrer

Hello,


I tried to upgrade my Mac Mini server from Mountain Lion and Server 2.2 to Mavericks and Server 3 and something went wrong. Nothing seems to be working anymore. This is what I am getting in my system log.


May 2 21:39:44 server.realityla.com collabd[87121]: [CSConnectionPool.m:187 b900000 +208ms] Schema is STILL out of date (0 < 166) after launching wikiadmin, update failed! collabd will refuse to run until this is fixed.

May 2 21:39:44 server.realityla.com collabd[87121]: [CSConnectionPool.m:196 b900000 +0ms] Could not open a connection to Postgres. Please make sure it is running and has the correct access.

May 2 21:39:44 server.realityla.com collabd[87121]: [CSXCWorkSchedulerService.m:234 b900000 +0ms] Caught exception PGCQueryError [Error executing query [SELECT max(last_run_time) FROM work_schedule_status]: ERROR: relation "work_schedule_status" does not exist

LINE 1: SELECT max(last_run_time) FROM work_schedule_status

^

] in scheduler thread (outer loop):

(

0 CoreFoundation 0x00007fff8e8ce25c __exceptionPreprocess + 172

1 libobjc.A.dylib 0x00007fff8bb82e75 objc_exception_throw + 43

2 PostgreSQLClient 0x0000000108b001fe -[PGCConnection checkResultOK:forSQL:] + 697

3 PostgreSQLClient 0x0000000108b01758 -[PGCConnection executeScalar:] + 241

4 CSService 0x0000000108c764ce -[CSXCWorkSchedulerService schedulerThread:] + 229

5 Foundation 0x00007fff8cc9e76b __NSThread__main__ + 1318

6 libsystem_pthread.dylib 0x00007fff93b72899 _pthread_body + 138

7 libsystem_pthread.dylib 0x00007fff93b7272a _pthread_struct_init + 0

8 libsystem_pthread.dylib 0x00007fff93b76fc9 thread_start + 13

)

May 2 21:39:44 server.realityla.com wikiadmin[71699]: [PGCConnection.m:176 7a5a2310 +0ms] Error in TXN: Error executing query [CREATE TABLE migration_entity (entity_uid_fk uuid PRIMARY KEY REFERENCES entity(uid))]: ERROR: relation "migration_entity" already exists


(

0 CoreFoundation 0x00007fff8e8ce25c __exceptionPreprocess + 172

1 libobjc.A.dylib 0x00007fff8bb82e75 objc_exception_throw + 43

2 PostgreSQLClient 0x00000001002e41fe -[PGCConnection checkResultOK:forSQL:] + 697

3 PostgreSQLClient 0x00000001002e4726 -[PGCConnection executeQuery:] + 237

4 wikiadmin 0x0000000100236a24 wikiadmin + 215588

5 wikiadmin 0x0000000100235b9b wikiadmin + 211867

6 PostgreSQLClient 0x00000001002e38fa -[PGCConnection transactionInBlock:onError:] + 79

7 wikiadmin 0x0000000100235af3 wikiadmin + 211699

8 wikiadmin 0x0000000100235d64 wikiadmin + 212324

9 CSService 0x0000000100313490 +[CSExecutionTimer recordTime:ofBlock:] + 78

10 CSService 0x00000001003132c2 +[CSExecutionTimer timerNamed:aroundBlock:] + 77

11 wikiadmin 0x0000000100235c76 wikiadmin + 212086

12 wikiadmin 0x00000001002368b1 wikiadmin + 215217

13 PostgreSQLClient 0x00000001002e3941 -[PGCConnection transactionInBlock:onError:] + 150

14 wikiadmin 0x0000000100235ee5 wikiadmin + 212709

15 wikiadmin 0x00000001002075b7 wikiadmin + 21943

16 libdyld.dylib 0x00007fff8bafe5fd start + 1

17 ??? 0x0000000000000002 0x0 + 2



It continues with this same information over and over again.


Someone please help!

Wiki migration issues to OSX Server Mavericks

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