Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. This page describes how to backup and upgrade the contents of this wiki ====== Backup ====== * download the whole wiki folder at ''./httpdocs/wiki'' to your local machine * (you might need to enable and run ''./httpdocs/fixfiles.php'' on your installation to make sure chmod is setup correctly * finally, run ''upgrade.sh backup'' to create a ''wiki-backup.tar.gz'' of all important files (plugins and templates will not be backed up) ====== Upgrade ====== * make backup first and place ''wiki-backup.tar.gz'' into ''Sites'' folder * download new [[http://www.dokuwiki.org/dokuwiki|dokuwiki.tgz]] release and place it into ''Sites'' folder * place ''upgrade.sh'' into same folder * run ''upgrade.sh all'' (will unpack, chmod and migrate data into new release) * adjust ''./wiki/.htaccess'' (i.e. RewriteBase /~user/wiki) * open webbrowser http://localhost/~user/wiki * re-install templates (http://www.dokuwiki.org/template) * [[http://www.dokuwiki.org/template:vector|Vector]] * re-install plugins (http://www.dokuwiki.org/plugins) * [[http://www.dokuwiki.org/plugin:note|Note]] * [[http://www.dokuwiki.org/plugin:gallery|Gallery]] * Change logo image of template * ''cp data/media/logo.png lib/tpl/vector/user/'' * Upload ''wiki'' folder to webserver * adjust/correct ''./httpdocs/wiki/.htaccess'' ====== Upgrade Test Run ====== * Upload new wiki folder to a different directory * adjust ''./httpdocs/wiki/.htaccess'' ====== upgrade.sh code ====== <code bash> #!/bin/sh wikidir=./wiki all() { clean && import && migrate } import() { echo "##### importing" tar xfz dokuwiki-*.tgz mv dokuwiki-????-??-?? $wikidir cd $wikidir chmod 777 conf chmod 777 lib/tpl chmod 777 lib/plugins chmod -R 777 data cd .. } migrate() { echo "##### migrating" tar xfpz wiki-backup.tar.gz cp -pR backup/* $wikidir cp backup/.htaccess $wikidir } backup() { echo "##### backup" [ -d backup ] && rm -rf backup mkdir backup mkdir backup/conf mkdir backup/data mkdir backup/data/pages mkdir backup/data/attic mkdir backup/data/meta mkdir backup/data/media mkdir backup/data/media_attic mkdir backup/data/media_meta # backup config cp $wikidir/.htaccess backup cp $wikidir/conf/local.php backup/conf cp $wikidir/conf/users.auth.php backup/conf cp $wikidir/conf/acl.auth.php backup/conf # migrate data dir cp -R $wikidir/data/pages/* backup/data/pages cp -R $wikidir/data/attic/* backup/data/attic cp -R $wikidir/data/meta/* backup/data/meta cp -R $wikidir/data/media/* backup/data/media cp -R $wikidir/data/media_attic/* backup/data/media_attic cp -R $wikidir/data/media_meta/* backup/data/media_meta chmod -R 777 backup rm -rf wiki-backup.tar.gz tar cfpz wiki-backup.tar.gz backup rm -rf backup } clean() { echo "##### cleaning" rm -rf $wikidir rm -rf backup } usage() { echo "Usage: $0 <action>" echo echo "ACTIONS:" declare -F | awk '{print " "$3}' | grep -v usage } if [ $# -eq 0 ]; then usage exit fi action="$1" shift declare -F "$action" >/dev/null && $action $* [ $? -ne 0 ] && echo "no such action: $action" echo "##### done" </code> wiki/upgrade.txt Last modified: 17-11-2016 12:34(external edit)