Wiki content?

I seem to have lost all my wiki content when upgrading from Snow Leopard server (10.6.8) to Lion server (10.7), I have however managed to copy the /Library/Collaboration folder from backup, but is there any way to import that content into the new Lion wikiserver 3?

(I have tried sudo wikiadmin migrate -r /path/to/collaboration/folder from the Upgrading_and_Migrating_v10.7 manual, but that failed)

Mac mini, Mac OS X (10.7), Server

Posted on Jul 21, 2011 7:55 PM

Reply
15 replies

Jul 24, 2011 11:25 AM in response to sjnorcross

Well, for me (moving from the latest 10.6-version to Lion), simply pulling the old /Library/Collaboration folder out from a Time Machine backup and copying it to a temporary location was needed. Then the


sudo wikiadmin migrate /tmp/Collaboration/


did the trick. Note that, other than in Mtaksrud's post above, there is no .../folder at the end. Migrated the whole content and all was accessible on the new machine.


No idea, though, where it's kept in Lion. But won't need to know until the next upgrade comes, I guess.


Cheers,

Hendrik

Jul 26, 2011 10:34 PM in response to mahongue

Hi!


@mahongue: IMHO, you're only seeing part of it. Under .../FileData you only find a copy of attachments to your wiki (pasted pictures etc.), not the wiki itself. So if you'd only back this up, you'd be pretty frustrated if you ever tried to play it back.


Looking at /etc/collabd/collabd.plist, I suspect that the new wiki is stored in a database by name of "collab", and looking at running processes, I find a

239 ?? Ss 0:00.01 postgres: collab collab [local] idle


So I guess the data now is in postgres, which makes backing it up a bit more complicated than in the past, where saving /Library/Collaboration did the trick. I supposed a "pg_dump -U collab collab >foo" would do the trick, so you could play back that database if you need to restore.


Cheers,

Hendrik

Jul 27, 2011 4:08 PM in response to Impossible Eagle

Thank you guys for your answers.


Actually I also did notice that under /FileData no actual content is stored. What I really want to do is just "restart" the wiki, because I was doing some tests, created several test users, etc. however even if I delete the wiki, some documents still exist. For example, I can't find a way to delete the "about" pages for already deleted users. Their About page is still there even though they don't exist anymore, and I don't really want a lot of "Wiki TEST" user pages...

Jul 29, 2011 1:08 PM in response to ESMP

/Librbary/Server/Wiki/FileData stores all of the files for the wiki server. All the wiki data itself is stored in the Postgres database.


If your database fu is very strong, you can drop tables and users and recreate them to reset the wiki. If all you want to do is hide particular users, you can do that by going to each user's My Page as an admin, clicking the gear menu and choosing "Hide Person..."

Jul 30, 2011 2:30 AM in response to ESMP

@Eduardo: I believe postgres stores the data under /var/pgsql. But I would not tamper with those files directly. If you want to back up, use the dump command above (pg_dump -U collab collab >foo), which gives you all the sql-instructions to set up, initialize and populate the databse with the current content. So in principle, you could dump the db, then drop it (delete it from postgres), then make a copy of your dump and edit it (it's clear text) to delete all data, and then reload it into postgres.


If you open the dump, first you'll find table and function defintions, and then the data, so with a bit of experimenting you should be able to delete that.


Or: drop the db from postgres, disable wiki and re-enable it in the Server app. Possibly that reinitializes the db. As always, keep a backup handy and use at your own risk.


About the postgres raw files under /var/pgsql: I believe also iCal data is stored in postgres, so if you fool around with the files in there, you may lose more than only your wiki.


Cheers,

Hendrik

Sep 30, 2011 1:51 AM in response to Mtaksrud

To address a couple of issues raised in this thread:


Wiki backup: The commands to back up and restore the Wiki can be found here.


Dropping the Wiki database: Someone speculated that you could "drop the db from postgres, disable wiki and re-enable it in the Server app. Possibly that reinitializes the db." It does not. It just sits there and complains that the DB is missing. What I haven't tried is doing pg_dump on, say, a virgin 10.7 server and then restoring that over the corrupt DB. I have a hunch that the DB has host-specific parameters baked in and this would not work, but I could be wrong. Moral of the story: Back up your DB early and often. Related moral: Snapshot your VMs.


Unhide users: Someone asked how to unhide people. I haven't tried this, but I noticed that in /etc/collabd/collabd-search.plist, there's this bit:

<key>ignoredEntityExpressions</key>

<array>

<dict>

<key>type</key>

<string>com.apple.entity.FileData</string>

</dict>

<dict>

<key>isHidden</key>

<real>1</real>

</dict>

<dict>

<key>isDeleted</key>

<real>1</real>

</dict>

<dict>

<key>isPermanentlyDeleted</key>

<real>1</real>

</dict>

</array>


It could be that if you edited the value for isHidden to be 0, it would show hidden pages in a search (assuming you knew what you were searching for) and then you could open and unhide them. Maybe not, though - someone should try it.

Feb 25, 2012 10:56 AM in response to Ordo ab Chao

You could follow several steps to unhide a person, which is hidden by "hide a person..."

1. Go to the "People" page;

2. Create a new page by clicking the plus botton;

3. The new page that you've created must have exactly the same name of the hidden person's name;

4. Refresh and go back to your "People" page, the hidden person is back;

5. Now you could delete the page you've just created, and meanwhile you could hide yourself again by clicking "Config".

Ordo ab Chao wrote:


@Doug,


Yes, you're right about "Hide Person...", but then how do you unhide that person ? Impossible for me to find out anything about that. Can you help ? Thanks.


About the wiki data, doing a "pg_dump" works perfectly (I had to "su" before).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Wiki content?

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