将wiki迁移至 Miraheze

From Miraheze Meta, Miraheze's central coordination wiki
This page is a translated version of the page Moving a wiki to Miraheze and the translation is 39% complete.
Outdated translations are marked like this.
将wiki迁移至 Miraheze
欢迎来到 Miraheze,我们很高兴您能来到这里!

将 wiki 迁移至 Miraheze 并不是一件难事。无论 wiki 是由您自己、Fandom 还是其他 MediaWiki 托管商(即 wiki 农场)托管,都可以将 wiki 迁移到 Miraheze。只要您有数据库转储文件('XML'文件),任务就很简单!

导出wiki

该过程的第一步是生成wiki的 XML 转储文件(也称为数据库转储)。该文件将包含您wiki上的所有页面(包括用户页面图像描述,但不包括独立的图像本身)。根据不同的wiki农场或站点,导出这个文件的方法有所不同。

从 Fandom 迁移

在 Fandom 上生成转储文件的按钮

Fandom(以前称为Wikia)提供每个wiki的 XML 转储,可以通过wiki上的[[Special:Statistics]]获取。请注意,此文件并非每天生成,可能已过时。如果它已过时,wiki管理员可以单击那里的“发送请求”按钮来请求生成更新的转储文件。如果您的wiki没有活跃的管理员,您必须请求 Fandom 支持为您生成一个。完成后,请转到“导入wiki”部分。

 Note: Fandom 不允许wiki关闭(除非在某些情况下,如小型、利基wiki)、大量删除页面或从首页上链接到外部的非 Fandom 托管的wiki。他们的方针只允许在首页上放入有关移动的公开帖子的链接。2周后,必须从帖子中删除指向新wiki的链接。[1]

图像

如果愿意,您可以向 Miraheze 提供来自 Fandom 的图像转储文件以供自动上传。请注意,根据 Fandom 的使用条款,自动爬取图片是对 Fandom 的使用条款的违反,并且图片不在 XML 转储文件中提供。我们认为,手动下载依然合规,并且有关工具也有可能存在,但是 Miraheze 无法在这一过程中为您提供帮助。由于与您个人上传的图像相关联的一些元数据,您可能在欧盟的《通用数据保护条例》第20条中享有其他权利。

从 Wikidot 迁移

从 Wikidot 迁移可能会带来更特殊的挑战。Wikidot 不运行 MediaWiki,他们使用与 MediaWiki 不兼容的专有软件解决方案。

Some scripts exist to convert Wikidot backups to MediaWiki-compatible XML files. One which has had reported success in the past is this script. Note that it requires an outdated version of Python (2.9) to run and that it is a shell script which may not be intuitive for less technically knowledgeable users.

Exporting via maintenance scripts

If you have server access and if you are moving an entire wiki, the easiest way to do so is using a maintenance script to export your entire wiki. For more information, checkout the documentation on dumpBackup.php on MediaWiki.org. Once you have a database dump, skip to "Importing a wiki."

Exporting images via maintenance scripts

If you have server access, you can use maintenance script dumpUploads.php. Once you have an image dump, skip to "Importing a wiki."

WikiTeam3

If these methods don't work, you can generate a database and/or file dump using Save the Web Project's WikiTeam3 Python script, (runs from the command-line in a terminal). This will dump the XML and files (including images). See Backups#WikiTeam3 for details.

Exporting from Special:Export

You can export a wiki manually using Special:Export. That page is self-explanatory, just make sure to uncheck "Include only the current revision, not the full history" as most licenses (such as Creative Commons) require attribution to be rendered so failing to do that will cause legal headaches. While this is useful for smaller wikis or if you're exporting small amounts of pages, it can be tedious to use this interface if exporting an entire wiki.

Caveats

  • Apart from the Mediawiki Dump Generator method, none of the methods here export image files. You will have to copy the files and give them to the Miraheze Technology team for processing (via a Phorge ticket).
  • None of these tools move user accounts.
  • As always, any data transferred must have the proper copyright, and you must have a licence or ownership that allows you to host the content at Miraheze (e.g. Creative Commons). If you need to change the licence of the wiki as a whole from CC-SA to some other licence, please note this in your upload request.

Importing a wiki

There are a few methods for importing a wiki. Generally, you should always have us do large imports as MediaWiki will display an error if the import is over a few kilobytes big. If your import is small enough, however, you can do it yourself without needing us.

自己做

If it's a small wiki, where you're the only editor, and you don't mind losing the page history, you can copy and paste the text in the source editor from one wiki to the other.

If your dump is really small (less than few kilobytes), you can try Special:Import on your wiki (not this wiki, Miraheze Meta). Images cannot be restored imported using that page. If the import is small enough, your import should finish, and you’ll be able to use your wiki.

If the import fails, please see below section.

 Note: If you choose to do it yourself, you’ll have to manually upload images and files yourself. You can use the normal upload interface to do this, or you can use the MsUpload extension to drag and drop and upload many at once, through the wiki editor. To enable MsUpload, in the sidebar go to Manage this wiki's extensions, search for MsUpload and check it.

Have us do it

XML (Content) Imports: If your XML dump file is big enough that MediaWiki will likely fail to process it in an appropriate amount of time (files over a few kilobytes), you’ll have to request that a member of the Technology team import it for you. To request that we import the file, please use Special:RequestImport and fill in the form.

For image imports, please use Phorge (Phorge account required). You can send us your images file in a few different ways:

  • On the Phorge task, paste a link to where it can be downloaded from (i.e. Google Drive, Dropbox)
  • Send it to sre-mediawiki@miraheze.org
  • If it’s small enough, upload it directly to Phorge

In the meanwhile, while you wait for the import to be done, you should avoid creating new pages that share the same name as pages on your old wiki. That will cause a conflict and the imported version of the page will not override your newly created page. If this happens, you yourself need to manually restore an older revision of the page through the history tab to get an older version of the page to display.

 Note: We disable any editing (including account creation) on the wiki during the import process: Your wiki users need to create an account on Meta (this wiki!) and use that username and password to log in on the wiki until the import is complete.

See also

References