Hello
I would like to know why, instead of upgrading from a very old Mediawiki version the following procedure is not possible :
1. save all pages + histories on disk using something like export 2. install a fresh uptodate Mediawiki 3. import all pages + histories from disk 4. remove the old mediawiki version
Best Francois Colonna
Frames Project wrote:
Hello
I would like to know why, instead of upgrading from a very old Mediawiki version the following procedure is not possible :
You can but with just a dump/restore, at the very least, you'll lose user accounts (I'm not entirely sure how that works for images either).
Restoring everything - including accounts and preferences - is possible if you're not afraid of databases. I used the following procedure to do a complete dump & rebuild (including users) on my PostgreSQL-based install:
1. Dump content (dumpBackup.php --full) 2. Populate database on new install via config/ 3. Replace the generated LocalSettings.php 4. Run importDump.php 5. Export some tables: pg_dump mediawiki.image -a > mediawiki.image.dump pg_dump mediawiki.oldimage -a > mediawiki.oldimage.dump pg_dump mediawiki.mwuser -a > mediawiki.mwuser.dump pg_dump mediawiki.recentchanges -a > mediawiki.recentchanges.dump pg_dump mediawiki.user_groups -a > mediawiki.user_groups.dump pg_dump mediawiki.interwiki -a > mediawiki.interwiki.dump (NOTE: I only dumped this because we use custom IW prefixes) pg_dump mediawiki.watchlist -a > mediawiki.watchlist.dump pg_dump mediawiki.pagecontent -a > mediawiki.pagecontent.dump
6. Reimport in the required order: TRUNCATE mediawiki.pagecontent; \i mediawiki.pagecontent.dump TRUNCATE mediawiki.mwuser cascade; \i mediawiki.mwuser.dump \i mediawiki.user_groups.dump TRUNCATE mediawiki.image cascade; TRUNCATE mediawiki.oldimage cascade; \i mediawiki.image.dump \i mediawiki.oldimage.dump \i mediawiki.recentchanges.dump \i mediawiki.interwiki.dump \i mediawiki.watchlist.dump
YMMV, but the only problem I've encountered so far was a screwed up sequence in the user IDs that was fixed with an ALTER SEQUENCE ... RESTART.
As a disclaimer, there could be plenty of other things that may go wrong with this procedure as it relates the DB dumps/restores. We're fortunate enough to have staff that could debug and fix any of these problems should they come up. I really wouldn't recommend doing anything beyond Step 4 if you (or your company/organization) don't have the experience and PHP/SQL knowledge to do serious debugging and fixing.
Le vendredi 24 octobre 2008 à 07:05 -0400, Sean McAfee a écrit :
Frames Project wrote:
Hello
I would like to know why, instead of upgrading from a very old Mediawiki version the following procedure is not possible :
You can but with just a dump/restore, at the very least, you'll lose user accounts (I'm not entirely sure how that works for images either).
Restoring everything - including accounts and preferences - is possible if you're not afraid of databases.
Thank you for your answer. Yes I am afraid of databases, especially the one I use : MySql !
So, a reinstall Export/Import procedure should work for pages but will lose users data and images ?
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?
Best Francois Colonna
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
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
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
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 !
Most people are just asking how to upgrade when the answer is already in the manual.
The actual problems are mostly related to using the new version, not converting to it. Those problems would be the same regardless of the upgrade method.
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.
If we introduced a second method, we'd triple our problems, because the new one would be twice as buggy as the old one.
-- Tim Starling
Hi :)
In the webbrowser in Wiki under "Special" I can find "Export pages", which is saved as an .xml-file.
Where do I find "Import pages"?
Best Regards, René V.
-----Oprindelig meddelelse----- Fra: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] På vegne af Frames Project Sendt: 24. oktober 2008 10:08 Til: MediaWiki announcements and site admin list Emne: [Mediawiki-l] Using export/import instead of upgrading
Hello
I would like to know why, instead of upgrading from a very old Mediawiki version the following procedure is not possible :
- save all pages + histories on disk using something like
export 2. install a fresh uptodate Mediawiki 3. import all pages + histories from disk 4. remove the old mediawiki version
Best Francois Colonna
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 10/24/08, René Vestergaard rve@techno-matic.dk wrote:
In the webbrowser in Wiki under "Special" I can find "Export pages", which is saved as an .xml-file.
Where do I find "Import pages"?
I think you need to give yourself the "importupload" right, see
http://www.mediawiki.org/wiki/Manual:User_rights
—C.W.
mediawiki-l@lists.wikimedia.org