DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:backup

This is an old revision of the document!


How to backup DokuWiki?

:?: How can I backup my DokuWiki? What parts do I need to backup?

:!: Since DokuWiki does not use a database, backups are really simple. All you need to do is copy the files. The easiest way is just to backup your whole DokuWiki directory.

If you want to save some space you should at least backup the following directories:

  • data/pages - contains your current pages
  • data/meta - contains meta information about your pages (like who created it originally, who subscribed to it, …)
  • data/media - contains your current media (images, PDFs, …)
  • data/media_meta - meta data for the media
  • data/attic - all the old versions of your pages
  • data/media_attic - all the old versions of your media
  • conf - the configuration settings

You can exclude the cache, index, locks, and tmp directories.

How to restore from backup DokuWiki?

Restore DokuWiki on same server - different folder

Background: 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

faq/backup.1469145277.txt.gz · Last modified: 2016-07-22 01:54 by jjensen

Except where otherwise noted, content on this wiki is licensed under the following license: 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