We're using MW 1.4.7 for an internal docs site and now we find we need to split off a sizable chunk into it's own wiki (different user population).
I searched the FAQ but didn't see anything specific. Is there a "magic" way of doing this? I don't see copying and pasting all the content being do-able ...
-- Peter Laws | plaws plaws net | "They that can give up essential Liberty to obtain a little temporary safety deserve neither liberty nor safety."-Ben Franklin
On 19/01/06, Peter Laws plaws@plaws.net wrote:
We're using MW 1.4.7 for an internal docs site and now we find we need to split off a sizable chunk into it's own wiki (different user population).
I searched the FAQ but didn't see anything specific. Is there a "magic" way of doing this? I don't see copying and pasting all the content being do-able ...
Probably the best way would be to use the XML export/import tools, the simplest of which is the "Special:Export" and "Special:Import" pages - give Special:Export on one wiki a list of page titles, and it will give you an XML file to upload into Special:Import on the second wiki. (The XML just encodes metadata like title, age, optionally history, etc).
For more complex situations, there's things like mwDumper which are designed for producing database dumps - also in XML wrappers, for compatibiilty.
-- Rowan Collins BSc [IMSoP]
On Fri, 20 Jan 2006, Rowan Collins wrote:
Probably the best way would be to use the XML export/import tools, the simplest of which is the "Special:Export" and "Special:Import" pages -
I saw the Special:Export, but I don't see Special:Import - is that new in 1.5.x?
For more complex situations, there's things like mwDumper which are designed for producing database dumps - also in XML wrappers, for compatibiilty.
We're fortunate that this wiki only went live in August, so it's only about 115 articles TOTAL, and I think only about 20 need to move.
On 20/01/06, Peter Laws plaws@plaws.net wrote:
On Fri, 20 Jan 2006, Rowan Collins wrote:
Probably the best way would be to use the XML export/import tools, the simplest of which is the "Special:Export" and "Special:Import" pages -
I saw the Special:Export, but I don't see Special:Import - is that new in 1.5.x?
Hm, maybe it is - unless you're not logged in as a user who has rights for it (i.e. 'sysop' under 1.4). If it *does* require 1.5, though, that's no problem - presumably you'll be setting up a new wiki for the forked off content, so you could use 1.5 from the word go. And it would be no bad thing to upgrade your old one anyway.
There's also a command-line importDump.php script, but that's definitely only for 1.5.
-- Rowan Collins BSc [IMSoP]
On Fri, 20 Jan 2006, Rowan Collins wrote:
Hm, maybe it is - unless you're not logged in as a user who has rights for it (i.e. 'sysop' under 1.4).
No, I'm sysopped.
If it *does* require 1.5, though, that's no problem - presumably you'll be setting up a new wiki for the forked off content, so you could use
The plan is to make the new wiki with the latest version, then upgrade the old one later ...
There's also a command-line importDump.php script, but that's definitely only for 1.5.
I see that in .../maintenance ... Does it work? :-)
So would I be better off:
1) building the new wiki using 1.5.x, dumping the content I need from the old (v1.4.7) wiki, and trying to import to the new
or
2) upgrading the old wiki to 1.5.x and then moving the content to the new wiki (also built with 1.5.x)?
I am no MySQL wiz, and did not have any fun trying to upgrade before ...
-- Peter Laws | plaws plaws net | "They that can give up essential Liberty to obtain a little temporary safety deserve neither liberty nor safety."-Ben Franklin
On 20/01/06, Peter Laws plaws@plaws.net wrote:
There's also a command-line importDump.php script, but that's definitely only for 1.5.
I see that in .../maintenance ... Does it work? :-)
I think so - though I've never used it myself.
So would I be better off:
- building the new wiki using 1.5.x, dumping the content I need from the
old (v1.4.7) wiki, and trying to import to the new
It shouldn't make any difference moving data from one version to the other - this is why the data is exported in an XML wrapper, even if you run a script to dump the whole database, because it represents it independent of the underlying DB structures. So if you want to put off upgrading the old wiki, just install 1.5 and hope I'm right about Special:Import actually working in that version ;)
-- Rowan Collins BSc [IMSoP]
On Fri, 20 Jan 2006, Rowan Collins wrote:
On 20/01/06, Peter Laws plaws@plaws.net wrote:
There's also a command-line importDump.php script, but that's definitely only for 1.5.
I see that in .../maintenance ... Does it work? :-)
I think so - though I've never used it myself.
Well, it appears that the Special:Export (isn't that a beer?) on 1.4.7 works and that the Special:Import on 1.5.5 *mostly* works.
I've imported pages one at a time and en masse and they show up OK, but things like links show up in red (set for edit).
Example: I import Article_A and Article_B. Article_A has a link to Article_B. Both pages import just fine and load up, no problem, but the link on A that points to B is red.
-- Peter Laws | plaws plaws net | "They that can give up essential Liberty to obtain a little temporary safety deserve neither liberty nor safety."-Ben Franklin
On 21/01/06, Peter Laws plaws@plaws.net wrote:
I've imported pages one at a time and en masse and they show up OK, but things like links show up in red (set for edit).
Ah yes, I thought of that and then forgot to mention it, sorry - the import scripts don't run the same post-save steps that saving the edits individually would, such as updating the links tables in the database. [Theoretically easy to fix, but a potential performance killer if you imported too much at once...]
As soon as you edit and save each page (even if you make no changes, a "null edit", which won't even show up in the history) the updates will be run on that page.
If you have command-line access to the server, though, you can do it all in one go using the 'maintenance/rebuildall.php' script (you'll need to create an AdminSettings.php if you haven't already; see AdminSettings.sample).
-- Rowan Collins BSc [IMSoP]
mediawiki-l@lists.wikimedia.org