[Mediawiki-l] Using export/import instead of upgrading

Daniel Friesen dan_the_man at telus.net
Sat Oct 25 02:07:36 UTC 2008


People complain about issues cause they don't follow instructions (Back 
up your wiki so that if something goes wrong there is no issue, it's 
right in the upgrade page).

Database changes are not a problem for upgrades. We have upgrade.php 
which handles all that, no change is made to the database unless it's 
done with upgrade.php which will apply all changes in order onto the 
database preserving the data.

Exporting and then importing isn't a very good idea for upgrading. Other 
than losing user and image data there are a variety of other downsides 
to it.
* Since you didn't use the normal upgrade process, your server is 
burdened with reindexing various things including search info, link 
info, categories, etc... All this indexed data can take some time to 
reindex depending on what data you have. The actual export/import 
process would also take far longer than it would to simply apply the 
changes needed to the database.
* Additionally Export does not handle anything for extensions. If you 
have an extension which stores other information in other database 
tables, it won't be included in export and you will lose it as well.
* Additionally export/import does not preserve logs, recent changes, 
page protection, blocks, and a whole variety of other things inside the 
database. All of this is preserved in a proper upgrade. Additionally 
this list will grow, and it isn't viable to create export formats for 
these. They do change, such as protection expanding to support expiries 
and cascading, and in the process being stored in a different way. An 
import may not be able to handle the format that old exports were made 
with. But the upgrade process takes these changes into account and makes 
sure that when an upgrade is done this data is converted to the new 
format so that it is preserved.

But quite simply, if you backup before you upgrade, and for some 
unforseen reason something breaks. You can simply restore the old 
version, and ask someone in here to help find what went wrong. 99% of 
the time nothing goes wrong.

Remember Wikipedia? Wikimedia runs off MediaWiki and is being constantly 
upgraded. If the upgrade process wasn't handled right then you'd see 
Wikipedia broken all the time. And if Wikipedia was forced to use 
Export/Import, then it would likely take a month just to make one 
upgrade. ;) At which point you would need to upgrade again.

So the moral of the story... Read instructions, and don't try to come up 
with alternative methods which will have less support then the 
recommended methods.

~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)

Frames Project wrote:
> Le samedi 25 octobre 2008 à 01:26 +1100, Tim Starling a écrit :
>   
>> Frames Project wrote:
>>     
>>> Is it possible to ask the software team to write an Export and Import
>>> functionnality including images and users data ? This could avoid all
>>> the upgrading problems? 
>>>       
>> What problems?
>>
>> -- Tim Starling
>>     
>
> practically everyday on this list someone is complaining of errors in
> upgrading... so I never dare to do it !
>
> Anyway, the point is that instead of upgrading the code an alternative
> could be to reinstall the code and copy the pages to the new code,
> especially if the databases management has been modified in the new
> versions.
>
> Francois Colonna
>   




More information about the MediaWiki-l mailing list