MigrateToMediaWiki: Difference between revisions
Line 27: | Line 27: | ||
=== Conversion from Trac to MediaWiki === | === Conversion from Trac to MediaWiki === | ||
For each Trac wiki that you would like to migrate, you have to create a new empty MediaWiki. I won't explain all the details here, but instead, I'll just say that I first followed [http://mechanicalkeys.com/wiki/index.php?title=Install_MediaWiki_on_CentOS_6.4 this], and then, when I realized that this recipe was valid for a single MediaWiki, I moved to [http://sharkysoft.com/wiki/how_to_configure_multiple_MediaWiki_instances_on_a_single_host this] one, that seems to me easier and closer to what I want. | For each Trac wiki that you would like to migrate, you have to create a new empty MediaWiki. I won't explain all the details here, but instead, I'll just say that I first followed [http://mechanicalkeys.com/wiki/index.php?title=Install_MediaWiki_on_CentOS_6.4 this], and then, when I realized that this recipe was valid for a single MediaWiki, I moved to [http://sharkysoft.com/wiki/how_to_configure_multiple_MediaWiki_instances_on_a_single_host this] one, that seems to me easier and closer to what I want. | ||
Here are steps to create a wiki "test" : | |||
<pre> | |||
mkdir /var/www/mediawiki199/test | |||
chown apache:apache /var/www/mediawiki199/test | |||
cd /var/www/mediawiki199/test | |||
ln -s /usr/share/mediawiki199/* . | |||
rm LocalSetting.php AdminSettings.php images mw-config | |||
cp -a /usr/share/mediawiki199/mw-config . | |||
</pre> | |||
Now, for each wiki, the next step is to export all the pages in txt format, convert them in MediaWiki format, and then import the converted pages in the corresponding MediaWiki. To avoid hours of tedious manual tasks, a script has been created, and it is available on our SVN "scripting" repository : http://mon.iihe.ac.be/repos/scripting/mon/convert_trac_to_mediawiki/. Here is an example showing how to use it : | Now, for each wiki, the next step is to export all the pages in txt format, convert them in MediaWiki format, and then import the converted pages in the corresponding MediaWiki. To avoid hours of tedious manual tasks, a script has been created, and it is available on our SVN "scripting" repository : http://mon.iihe.ac.be/repos/scripting/mon/convert_trac_to_mediawiki/. Here is an example showing how to use it : | ||
Line 35: | Line 45: | ||
./export_all_pages.pl /var/www/trac/t2b /var/www/mediawiki119/t2b | ./export_all_pages.pl /var/www/trac/t2b /var/www/mediawiki119/t2b | ||
</pre> | </pre> | ||
=== Sources === | === Sources === |
Revision as of 09:27, 27 August 2015
The plan of the migration
Here are the steps :
- creation of a new Apache webserver called "mona" with Quattor
- moving all the Trac wiki's to mona
- conversion of the Trac wiki's to MediaWiki (thanks to a homebrewed script)
- once everything is ready, switch to the new webserver in the DNS servers
Creation of the new webserver
It is a virtual machine with 60GB of disk size (see the hardware template hardware/machine/Virtual/virtual_kvm_mon for more details). The software configuration is done through the template config/t2b_docu_server.
Moving the Trac wiki's to the new webserver
For each wiki that was on the old mon server, create a new wiki on the new webserver with the trac-admin command. For example :
trac-admin /var/www/trac/t2b initenv
On the old webserver, you make a copy of each wiki to a nfs-shared directory. Going on with the previous example, it gives something like this :
trac-admin /var/www/trac/t2b hotcopy /userbackup/sgerard/trac_backup_20-08-2015/t2b
Now, going back to the new webserver, we can simply overwrite the content of /var/www/trac/t2b with the content of the back-up copy :
cp -a -p /userbackup/sgerard/trac_backup_20-08-2015/t2b /var/www/trac/
(Of course, it works because the nfs-share where the backup copy was done on the old server has been mounted on the new webserver thanks to Quattor ;-)
Conversion from Trac to MediaWiki
For each Trac wiki that you would like to migrate, you have to create a new empty MediaWiki. I won't explain all the details here, but instead, I'll just say that I first followed this, and then, when I realized that this recipe was valid for a single MediaWiki, I moved to this one, that seems to me easier and closer to what I want.
Here are steps to create a wiki "test" :
mkdir /var/www/mediawiki199/test chown apache:apache /var/www/mediawiki199/test cd /var/www/mediawiki199/test ln -s /usr/share/mediawiki199/* . rm LocalSetting.php AdminSettings.php images mw-config cp -a /usr/share/mediawiki199/mw-config .
Now, for each wiki, the next step is to export all the pages in txt format, convert them in MediaWiki format, and then import the converted pages in the corresponding MediaWiki. To avoid hours of tedious manual tasks, a script has been created, and it is available on our SVN "scripting" repository : http://mon.iihe.ac.be/repos/scripting/mon/convert_trac_to_mediawiki/. Here is an example showing how to use it :
ssh mona svn co http://mon.iihe.ac.be/repos/scripting/mon/convert_trac_to_mediawiki cd convert_trac_to_mediawiki ./export_all_pages.pl /var/www/trac/t2b /var/www/mediawiki119/t2b
Sources
- http://mechanicalkeys.com/wiki/index.php?title=Install_MediaWiki_on_CentOS_6.4
- http://sharkysoft.com/wiki/how_to_configure_multiple_MediaWiki_instances_on_a_single_host
- https://www.mediawiki.org/wiki/Extension:TracWiki2MediaWiki