-
All replies
-
Helpful answers
-
May 7, 2014 1:49 AM in response to Tangier Clarke1by Fridgemagnet,I think you need to leave the / off the front of the command so pg_dump instead of /pg_dump
-
May 7, 2014 8:04 AM in response to llferrerby Georg Egger,All i did was install mavericks... then i copied over server app 3.0.3
had a time machine backup with firewire selected it, and migrated the server settings,
the whole wiki was restored after running server.app , all od users are here..
only problem :
I had wikis wit ä and ö those are here...but for example Verträge.html became Vetrge.html however
when you go into wikis...you cant see it...but you can search for it its all there...
the link however is cryptic:
..../wikis/yu423425/Vertrge.hmtl
now i thought wow ..ok i just connect with pgadmin and fix that in the database...
well I can connect..but i can not see the collabd database like on the original server....
its just not there....though..its running so it should be there !
i dont get it
-
Jun 5, 2014 4:09 PM in response to llferrerby chrismo2001,This is crazy. I'm in the same boat. I have a ML server 2.2.1 with a Brand New Mavericks server. I'm looking for imfromation on how to simply migrate the wiki, but all I see is that it cant be done.
Is Apple really leaving us in the dark here on this one? Did they make a server appication that cannot migrate wiki data? What am I to do? Rebuild Wiki from scratch?
Theres got to be a way.
-
Jul 25, 2014 11:31 PM in response to capitanuby delmod,Thanks for the tutorial, but when I'm trying to restore I have always "pg_restore: command not found". Any help how to restore?. There is a sintaxis mistake? (My folder with the collab.pgdump is "temp2")
servidor:~ admin$ sudo pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /temp2/collab.pgdump
sudo: pg_restore: command not found
-
Jul 26, 2014 12:06 AM in response to delmodby Semmelrocc,Try this one:
sudo /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /temp2/collab.pgdump
-
Jul 27, 2014 2:01 PM in response to Semmelroccby delmod,This has been a weekend of many tests:
In the Wiki source I backup the database OK:
servidor:~ admin$ sudo pg_dump -h "/Library/Server/Wiki/PostgresSocket" --format=c --compress=9 --blobs --username=collab --file=/temp2/collab.pgdump collab
But if immediately I try to restore from this file, this it´s what happen:
servidor:~ admin$ sudo /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /temp2/collab.pgdump
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 685; 1247 16388 TYPE acl_action collab
pg_restore: [archiver (db)] could not execute query: ERROR: type "acl_action" already exists
Command was: CREATE TYPE acl_action AS ENUM (
'read',
'write',
'delete',
'own',
'*'
);
If I translate the Wifi folder to another machine
servidor:~ admin$ sudo cp -r /Library/Server/Wiki /temp2
cp: /Library/Server/Wiki/PostgresSocket/.s.PGSQL.5432: Operation not supported on socket
cp: /Library/Server/Wiki/PostgresSocket/.xpg.skt: Operation not supported on socket
cp: /Library/Server/Wiki/PostgresSocket/.xpg.skt.lock: No such file or directory
cp: /Library/Server/Wiki/PostgresSocket/.xpg_ctl.pid: No such file or directory
and if I try to restore the database to this folder I get this:
servidor:~ admin$ sudo /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_restore -h "/Library/Server/Wiki/PostgresSocket" -d collab -U collab --single-transaction /temp2/collab.pgdump
pg_restore: [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/Wiki/PostgresSocket/.s.PGSQL.5432"?
In the logs:
27/07/14 22:06:44,680 collabd[7419]: [CSConnectionPool.m:196 c520000 +7838ms] Could not open a connection to Postgres. Please make sure it is running and has the correct access.
It seems the "restore sentence" it's not correct. Any idea?
-
Aug 13, 2014 11:59 AM in response to nfranzmeierby Tangier Clarke1,You mentioned that you can export and import the same database. Can you please elaborate on migrating a wiki from a Mavericks Server to a fresh Mavericks Server (both have Server.app 3.1.2)? I desperately need to know how to do this. I have a problematic Mavericks server (calendar and contacts services failed) and a fresh install with a new open directory, but I can't use it because I am being held hostage by wiki on the problematic server - the one we access and need to use.
-
May 27, 2015 6:47 PM in response to llferrerby bcollinsiv,This method requires zero postgres commands and it has worked several times for me now.
The easiest way to migrate Apple Wikis between Mavericks systems is by following these steps:
-
May 31, 2016 4:25 PM in response to nfranzmeierby motoneko,Hello,
I have a question about recreating command.
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";
Does this mean;
psql -h "/Library/Server/Wiki/PostgresSocket" -U collab 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";
Is it correct?