Migrate wiki data
How do you migrate wiki data from Yosemite Server 4.1 to a different Yosemite server?
XServer-OTHER, OS X Yosemite (10.10.3)
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 >
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 >
How do you migrate wiki data from Yosemite Server 4.1 to a different Yosemite server?
XServer-OTHER, OS X Yosemite (10.10.3)
# /Applications/Server.app/Contents/ServerRoot/usr/bin/wikiadmin
Usage:
wikiadmin
wikiadmin -h
wikiadmin migrate/rebuildSearchIndex/updateSchema/fixPermissions/resetQuicklooks [--logLevel emergency/alert/critical/error/warning/notice/info/debug] ( --sourceRoot PATH | -r PATH TO WIKI REPOSITORY ) (-g WIKINAME)
wikiadmin gatherWikiStats
wikiadmin gatherXCSStats
wikiadmin export -name WIKI_NAME -path EXPORT_PATH
wikiadmin import -path IMPORT_PATH
(note #1: -path is optional. Defaulting to /tmp/wikiadmin-export)
(note #2: -name can take a list of projects separated by a comma (WIKI_1,WIKI_2,WIKI_3, etc...)
Thanks for that input, I really appreciate it. The wiki is up and running, accessible from through a web browser. But whether I try to export or migrate, I get the following error. Any ideas?
Can't log to /Library/Server/Wiki/Logs/wikiadmin.log: Permission denied
2015-04-22 11:18:43.505 wikiadmin[54607:399830] [PostgreSQLClient.framework] [/SourceCache/CoreCollaboration/CoreCollaboration-478.15/Server/PostgreSQLClien t/PGCServer.m:45] Cannot init due to bad clusterDirectory /Library/Server/Wiki/Database.xpg/Cluster.pg, and no backup
Error: Postgres database is not available; exiting
You have to run wikiadmin as sudo root.
2015-04-22 11:41:44.512 wikiadmin[55358:408243] ==> Exporting...
2015-04-22 11:41:44.517 wikiadmin[55358:408243] ==> Export completed...
As you can see, this process takes no time at all and nothing there when finished. Am I missing something?
What command did you enter?
sudo wikiadmin export - name administrativeprocedures,deploystudio,knowledgebase,staffprocedures,windowsimag ing,workprocedures
I also tried it with just one wiki, as well as with the export path. Got the same result each time.
It would be awesome if there were some documentation on how to export (backup) all wikis, or somehow get a list of all WIKI_NAME.
Also not sure what is "PATH TO WIKI REPOSITORY" ....
- name
-name (no space)
That worked much better (usually does once you do it right, huh?). Is there anything special that has to be done to import that to another server? My understanding is to copy the exported files to the other machine, then use the import switch with the path to those files.
Also, is it better to migrate or export/import when moving it from one machine to the other.
My understanding is to copy the exported files to the other machine, then use the import switch with the path to those files.
Right.
Still need some handholding ...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-administrativeprocedures
2015-04-22 15:28:49.208 wikiadmin[6731:55385] ==> Importing Project...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-deploystudio
2015-04-22 15:29:41.101 wikiadmin[6773:55659] ==> Importing Project...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-knowledgebase
2015-04-22 15:29:59.216 wikiadmin[6791:55840] ==> Importing Project...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-staffprocedures
2015-04-22 15:31:38.085 wikiadmin[6847:56563] ==> Importing Project...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-windowsimaging
2015-04-22 15:32:09.678 wikiadmin[6873:56725] ==> Importing Project...
macserv:~ administrator$ sudo wikiadmin import -path /tmp/wikiadmin-export-workprocedures
2015-04-22 15:32:31.712 wikiadmin[6901:57024] ==> Importing Project...
macserv:~ administrator$ sudo serveradmin stop wiki
wiki:state = "STOPPING"
macserv:~ administrator$ sudo serveradmin start wiki
wiki:state = "STARTING"
But nothing is there in the new wiki.
Reboot and look again.
Still not showing up in the wiki. The folders are gone from the /tmp folder now. I guess I will check tomorrow, time to head out for the day. Thanks again for the help, I will let you know of the progress.
You could try moving the Wiki folder over and then running "wikiadmin migrate". If it doesn't work, I don't have any other suggestions. Always expect bugs in Server, especially when doing something undocumented.
Migrate wiki data