TurnKey Linux Virtual Appliance Library

Upgrade mediawiki-2008.10.29 to new server with mediawiki-2009.03

In our internal company network I have an installation of turnkey mediawiki-2008.10.29.

As we got a new computer, i want to upgrade it  to the actual version (2009.03).

I looked around in the internet and found several sites, but they all differ from each other and most of them just make a normal wiki upgrade... And It is also not a "standard" Installation so maybe if I use scripts from these pages, maybe dont work correct an I am afraid of destroing something.

 So pleay I need help on what is the best/easiest strategy, as I dont have so much experience with linux administration.

Thanks in Advance

Alon Swartz's picture

Upgrading MediaWiki

The steps below are written mainly from memory and some online resources [1] [2], and depending on your customizations might need to be tweaked, so I recommend performing a dummy restore running in Live mode. Once everything goes smoothly, do it for real.

Should go something like this:

On the old installation (2008.10.29)

1. Backup the database
mysqldump -uroot -pPASSWORD --add-drop-table wiki_db > /path/to/backup/wiki_db_backup.sql
2. Backup existing files

- /etc/mediawiki/* (just for reference, do not restore them)
- /var/lib/mediawiki/images
- any extra extensions you may have installed...

On the new installation (2009.03)

3. Copy over the database dump and other backed up files from the old installation

4. Restore the database
cd /path/to/backup
mysql -uroot -pPASSWORD --batch --execute 'use wiki_db; source wiki_db_backup.sql;'
5. Update the data schema
cp /usr/share/doc/mediawiki/examples/AdminSettings.sample /usr/share/mediawiki/AdminSettings.php

!!! configure the mysql root credentials in AdminSettings.php !!!

cd /usr/share/mediawiki/maintenance
php update.php

rm /usr/share/mediawiki/AdminSettings.php
6. Restore the files you backed up in step 6, and tweak /etc/mediawiki/LocalSettings.php using the your old configuration as a reference

7. Your done, now go play with your wiki... :)

Let us know how it goes, if you had any problems, and if you had to perform any other steps. It would be nice to create a doc page out of this...

Good luck!

Yes it works. Thanks a

Yes it works. Thanks a lot!

But I had to do it twice, because i oversaw the part to change the mysql ADMIN username/password:
$wgDBadminuser = 'wikiadmin'
$wgDBadminpassword = 'adminpass'
So I got some errors.

And what maybe is also important to look at step6 that all differences between the old and new LocalSessings.php is checked and to finish all these steps before starting playing around in the wiki.
Alon Swartz's picture

Great!

Great, I'm glad it worked!

I have updated my post above to reflect your feedback, thanks!

I am using the german

I am using the german version of the mediawiki, so I also use german Umlaute like ÄÜÖ... but with the above used mysqldump, he did not back up this charset correct. So at the new Installation, I am missing some articles and categories (I tried many combinations of writing these special characters, but couldnt find them.)

So what is the correct way of dumping it. I am afraid of doing something wrong, because a lot of people spent many hours on feeding the content!!

Following sites I found, but they are just confusing me...
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Character_set
Thanks in Advance,
Gregor
Alon Swartz's picture

A couple of shots in the dark

Hey Gregor,

I'm not really familiar with non-english character sets, so the best I can do (atleast for now) is take a couple of shots in the dark at a possible solution...

1. Enable experimental charset support for MySQL in MediaWiki LocalSettings.php
$wgDBmysql5 = true;
2. Attempt to dump from and import to mysql by specifying a default character set, such as latin1 or possibly even binary.
--default-character-set=latin1
--default-character-set=binary
Let us know how it goes, and if it doesn't work I'll do some more digging and see what I can come up with.

Good luck!

1) I activated the

1) I activated the $wgDBmysql5 = true; First it looked good, but then I had to find out that the installed AWC Forum extension is not working with this Funktion. (If I open the Forum I just get a page full of error messages)

2) I tried to export and then reimport, with "latin1" but the result was the same as before...

The question is, what is the best way for the future, how to set the language, especially if I want to use more languages. And what to do now...

Thanks in Advance,
Gregor

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)