DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:upgradescript

Small upgrade script for DokuWiki

The script doesn't seem to work correctly for upgrading to the 2006-03-09 version. –alejandro.garza_at_itesm.mx

This works for me and I make NO OTHER claim…. feel free to give it a whirl ;-)

  • Read and correct the paths at the head of the script
  • I run the script with '-xv' for error checking (See first line)
  • I've used this script for the last 2-3 upgrades without a problem
#!/bin/bash -xv
 
# The path to the root of the wiki
droot=/var/www/localhost/htdocs/dokuwiki
# The backup path
bdir=/tmp/dokuback
# The path to the newly unpacked source
ndir=/root/doku
 
# Make the tmp folder structure
mkdir $bdir
mkdir $bdir/conf
 
# Backup the local config
cp $droot/conf/local.php $bdir/conf
# Get the users auth file
cp $droot/conf/users.auth $bdir/conf
# Get the acl file
cp $droot/conf/acl.auth $bdir/conf
# Get the interwiki file
cp $droot/conf/interwiki.auth $bdir/conf
# Get the changes log
cp $droot/changes.log $bdir
 
# Grab all the media and attic files
cp -R $droot/media $bdir
cp -R $droot/attic $bdir
 
# Copy the data directory
cp -R $droot/data $bdir
# Remove the pages that are maintained in doku
rm $droot/data/syntax.txt
rm $droot/data/dokukwiki.txt
 
# Clean out the old directory
rm -R $droot/*
# Repopulate with new version
cp -R $ndir/* $droot
# Repopulate with old data
cp -R -f $bdir/* $droot
 
# Set the right attrs on the data dirs
chmod -R 777 $droot/data
chmod -R 777 $droot/attic
chmod -R 777 $droot/media
chmod 777 $droot/changes.log
chmod 777 $droot/users.auth
 
echo "Remember to 'rm -R $bdir' when you have checked that the wiki is now working"
tips/upgradescript.txt · Last modified: 2006-05-25 15:47 by 131.178.5.45

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