DokuWiki

It's better when it's simple

用户工具

站点工具


zh:faq:backup

这是本文档旧的修订版!


如何备份DokuWiki?

:?: 我如何备份我的 DokuWiki?我需要备份哪些部分?

:!: 由于 DokuWiki 不使用数据库,备份是很简单的。您需要做的就是拷贝所有的文件。最简单的方法就是备份您的整个 DokuWiki 目录。

如果您想要节约一些空间,您至少需要备份下列目录:

  • data/pages - 包含所有当前在用的页面
  • data/meta - 包含页面的元数据信息 (如谁创建的此页面,谁订阅了此页面, …)
  • data/media - 多媒体內容 (如图片, PDF文档, …)
  • data/media_meta - 多媒体文体元数据
  • data/attic - 页面所有的旧版本
  • data/media_attic - 元数据的所有旧版本
  • conf - 存放配置信息的文件夹

您可以忽略以下文件夹 cache, index, locks, 和 tmp

注意: Debian 布局 稍微有点不同。

如何从DokuWiki备份进行恢复?

恢复到同一台服务器 - 不同的文件夹

Scenario: want two duplicate/same versions of DokuWiki installed on the same server, where one install is live and the other install for testing

  1. Example case: original DokuWiki installed in ../dw folder. Then do a second install (same version of DokuWiki) in ../dw2 folder. Verify DokuWiki is working in ../dw2.
  2. Install custom DokuWiki template, in this case using vector template.
    1. Upload, extract and rename into the ../dw2/lib/tpl/vector folder
    2. If using a custom logo, then copy ../dw/lib/tpl/vector/user/logo.jpg to ../dw2/lib/tpl/vector/user/logo.jpg
  3. login DokuWiki Admin (Configuration Manager) make following changes
    1. Basic: change template to vector
    2. Advanced: use nice URLs > .htaccess
    3. Advanced: Use slash as namespace separator in URLs
  4. Configure URL Rewriting
    1. edit ../dw2/.htaccess.dist by uncommenting (removing #) the url rewrite code section then save as ../dw2/.htaccess
  5. Copy following folders
    1. ../dw/data to ../dw2/data
    2. ../dw/conf to ../dw2/conf
    3. ../dw/lib/plugins to ../dw2/lib/plugins (see below)
    4. Used GoDaddy File Manager on shared hosting unless you have shell access privileges.
  6. Plugins
    1. Option 1: copy ../dw/lib/plugins to ../dw2/lib/plugins
      1. login to DokuWiki Admin (Configuration Manager) > Extension Manager (plugin bundled with DokuWiki) to check for proper install and required updates to plugins/templates
      2. to ensure plugins are compatible, verify DokuWiki version is same between ../dw and ../dw2 (tip from mmturner)
    2. Option 2: manually download and extract plugins into the /dw2/lib/plugins folder
  7. Test everything is working
  8. References

See also

zh/faq/backup.1499694313.txt.gz · 最后更改: 2017-07-10 15:45 由 charlie

除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki