What is the current best practice for moving all images from one wiki "A" into a second, ACTIVE wiki "B"? Requirements are:
1. Detect any image naming collisions between the two wikis, and resolve them before import 2. Transfer all "File:..." pages from wiki "A" into wiki "B", including their revision history 3. Transfer all images from wiki "A" into wiki "B", including all old versions
Is /maintenance/importImages.php is the right tool? I could imagine finding all images in the /images folder and feeding them to importImages.php. Will that work together with importing all "File:..." pages from wiki "A" into wiki "B" via /maintenance/importDump.php? (It won't import all revisions of each image however....)
Or could we simply copy the /images folder from the first wiki to the second (using ordinary filesystem copy operations), and then use /maintenance/importDump.php to import the entire "File:" namespace from the first wiki into the second? Do all the hashed image file paths get preserved and continue to work?
Or is there a better method? Remember that wiki "B" is active and not a new, empty wiki.
Thanks, DanB
Daniel Barrett wrote:
What is the current best practice for moving all images from one wiki "A" into a second, ACTIVE wiki "B"? Requirements are:
Detect any image naming collisions between the two wikis,
and resolve them before import 2. Transfer all "File:..." pages from wiki "A" into wiki "B", including their revision history 3. Transfer all images from wiki "A" into wiki "B", including all old versions
Is /maintenance/importImages.php is the right tool? I could imagine finding all images in the /images folder and feeding them to importImages.php. Will that work together with importing all "File:..." pages from wiki "A" into wiki "B" via /maintenance/importDump.php? (It won't import all revisions of each image however....)
importImages.php will not meet your requirements.
Or could we simply copy the /images folder from the first wiki to the second (using ordinary filesystem copy operations), and then use /maintenance/importDump.php to import the entire "File:" namespace from the first wiki into the second? Do all the hashed image file paths get preserved and continue to work?
That would overwrite files with the same name, instead of dealing with conflicts in any sensible manner. And you would also need to copy the contents of the image and oldimage tables in the database.
Or is there a better method? Remember that wiki "B" is active and not a new, empty wiki.
I don't think there is any maintenance script which does what you need to do. Similar image move operations from the Wikipedias to Wikimedia Commons were just done using semi-automated client-side scripts, with image history not preserved.
There are a number of MediaWiki developers who may be able to write such a script for you, for a fee. Alternatively, you could reduce your requirements -- importImages.php will work well enough if you don't need to preserve the image upload history or old versions.
-- Tim Starling
Tim Starling responded:
importImages.php will not meet your requirements.
Thanks Tim. But importImages.php will be fine if we forget about image history, correct? Is it better to do:
1. importImages.php first, followed by importDump.php of all articles in the File namespace? or 2. importDump.php first, followed by importImages.php --overwrite?
There are a number of MediaWiki developers who may be able to write such a script for you, for a fee.
Heh... like me. :-) I just hoped to find something already working.
DanB
Daniel Barrett wrote:
Or is there a better method? Remember that wiki "B" is active and not a new, empty wiki.
I don't think there is any maintenance script which does what you need to do. Similar image move operations from the Wikipedias to Wikimedia Commons were just done using semi-automated client-side scripts, with image history not preserved.
Would a shared repository approach be enough for your needs? (instead of moving all images from A to B, have them on another wiki, but making them accessible from B using a sharedrepo)
mediawiki-l@lists.wikimedia.org