This article has been archived and is no longer updated by Apple.

Export and import wikis created with macOS Server

Learn how to use the wikiadmin command to export and import wikis that you created with the macOS Server Wiki service.

If you’re a macOS Server administrator, you might need to move your wikis to another server. You can use the wikiadmin command to export and import any wikis that you created with the macOS Server Wiki service.

Before you start, make sure that both servers run the same version of macOS Server. You can keep access permissions for your wikis on the second server. Just make sure that it’s bound to the same directory service as the first server.

When you're ready, use the wikiadmin command to export your wikis from the first server. Then, import them to the second one.

Export your wikis

To export all of your wikis to an archive, use the export subcommand with the -all flag. Use the -path flag to specify where you want to save the exported wikis:

sudo wikiadmin export -all -path /tmp/myexportedwikis

To import specific wikis, first use the export subcommand with the -l flag. It lets you see a list of wikis that you can export:

sudo wikiadmin export -l

Next, use the export subcommand. Pass the name of the wiki or wikis that you want to export to the -name flag. Use the -path flag to specify where you want to save the exported wikis:

sudo wikiadmin export -name biology,math -path /tmp/myexportedwikis

Import your wikis

After you export your wikis to an archive, use the import subcommand with the -all flag to import them. Use the -path flag to specify the path to the archive:

sudo wikiadmin import -all —path /tmp/myexportedwikis

To export specific wikis, first use the import subcommand with the -l flag to view a list of wikis in your archive. You’ll need to specify the path to the archive with the -path flag:

wikiadmin import -l -path /tmp/myexportedwikis

Next, use the import subcommand. Pass the name of the wiki or wikis that you want to export to the -name flag. Use the -path flag specify the path to the archive:

sudo wikiadmin import -name biology,math -path /tmp/myexportedwikis

For more examples and information about wikiadmin, use the manwikiadmin command in Terminal. It opens the manual page for the command.

Published Date: