Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How I upgraded my wiki from moinmoin-1.6.3 to moinmoin-1.7.1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sam_i_am
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2003
Posts: 124

PostPosted: Mon Aug 18, 2008 4:18 pm    Post subject: How I upgraded my wiki from moinmoin-1.6.3 to moinmoin-1.7.1 Reply with quote

I needed to upgrade moinmoin from 1.6.3 to 1.7.1 and was having a bit of trouble on my testing server as I messed up some steps and could not re-create the test environment as moinmoin-1.6.3 was no longer in portage [thread]. After re-installing 1.6.3 and restoring pages from production machine, I was able to successfully update the test machine. Production machine is still intact. It will be upgraded next weekend. Here are my steps. Hope they are useful for someone else.

These steps assume moinmoin-1.6.3 was installed using webapp-config and is using the supplied wikiconfig.py with appropriate modifications (i.e. not a wiki farm or other exotic system), your Wiki URL is example.com/ and is served out of /var/www/example.com/htdocs/

Disclaimer: These steps worked for me. If you follow them and mess up anything, please don't blame me

  1. Shut down the web server: "/etc/init.d/apache stop"
  2. Backup your data (see http://moinmo.in/HelpOnUpdating). Create a binary package of moinmoin-1.6.3 if you are paranoid and need a fool proof excape plan. (wish I thought of that before :oops: )
  3. Upgrade moinmoin [emerge -u moinmoin]. Be warned! This will remove old version and your website will not work until you complete all the steps.
  4. Run webapp upgrade:
    Code:
    ebapp-config -U -h example.com moinmoin 1.7.1
    This will create /var/www/example.com/moinmoin-1.7.1 which will contain the new data.
  5. Edit /var/www/example.com/moinmoin-1.7.1/wikiconfig.py to match what you had in /var/www/example.com/moinmoin-1.6.3/wikiconfig.py. Make sure to change the "url_prefix_static" to "/moin_static171" and change all occurences of /moin_static163 to /moin_static171
  6. Edit the config file for example.com in /etc/apache/vhosts.d/ and change all occurences of /moin_static163 to /moin_static171 as well
  7. Copy your pages to new version:
    Code:
    cp -a /var/www/example.com/moinmoin-1.6.3/data/* /var/www/example.com/moinmoin-1.7.1/data/

  8. Remove any compiled python code:
    Code:
    find /var/www/example.com/moinmoin-1.7.1/data/ -name \*.pyc -ok rm {} \;

  9. Remove any old cached pages:
    Code:
    rm -rf /var/www/example.com/moinmoin-1.7.1/data/cache/*

  10. Run moin migration script:
    Code:
    moin --config-dir=/var/www/example.com/moinmoin-1.7.1 --wiki-url=example.com/ migration data

  11. Restart the web server: "/etc/init.d/apache start"
  12. Check your website and revel in 1.7.1 goodness! :D

If the un-thinkable happens and you want to chuck all this and go back to good old days, you should be able to downgrade moinmoin using the binary package, restore all your pages (you backed it up, didn't you) and re-start the web server. I haven't tested this part, but should work in theory :wink:

Good luck!
Sam
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum