Hello,
I have to move my wiki installation several times a year and it's always a laborious, time-consuming admin task. http://www.mediawiki.org/wiki/Manual:Moving_a_wiki
I was wondering if there were any plans to make it easier? Would it be possible to develop a script or admin functionality to automate the task - saying breaking it into just two steps: "Export entire wiki" and "Import wiki". It would backup/restore the database, copy any additional files LocalSettings, (uploaded images etc), ...
Another problem I encounter is that one platform has an older version of mediawiki and the new platform has a newer version - but to move the wiki there's no way around installing two versions on one of the servers. Am I missing something?
Z. PS Thanks to all the contributors for the great software - it's really top quality! _________________________________________________________________ Want to be a Space Travel Agent? If it exists, you'll find it on SEEK http://clk.atdmt.com/NMN/go/157639089/direct/01/
Parker Jones wrote:
Hello,
I have to move my wiki installation several times a year and it's always a laborious, time-consuming admin task. http://www.mediawiki.org/wiki/Manual:Moving_a_wiki
I was wondering if there were any plans to make it easier? Would it be possible to develop a script or admin functionality to automate the task - saying breaking it into just two steps: "Export entire wiki" and "Import wiki". It would backup/restore the database, copy any additional files LocalSettings, (uploaded images etc), ...
It's easy to do, but each sysadmin will have different needs and will thus need different scripts.
Supposing the server location and db don't change between servers (eg. it is always on /wiki and localhost database with same user) it could be like this:
backup-wiki.sh mysqldump -u $USER --password=$PASSWORD $DATABASE -c > backup.sql || exit 1 bzip2 backup.sql || exit 1
tar cjf backup.tbz backup.sql.bz2 LocalSettings.php images/ math/ || exit 1
# Alternatively, tar the whole mediawiki folder
unbackup-wiki.sh # Unpack the backup on the latest mediawiki MW_VER=1.15.3 wget http://download.wikimedia.org/mediawiki/%60echo $MW_VER | sed "s/([0-9]*.[0-9]*).*/\1/"`/mediawiki-$MW_VER.tar.gz -O mediawiki.tgz || exit 1 tar xzf mediawiki.tgz || exit 1 cd mediawiki-* && mv * .. && cd .. && rmdir mediawiki-* || exit 1 tar xjf backup.tbz || exit 1 php5 maintenance/update.php || exit 1
Another problem I encounter is that one platform has an older version of mediawiki and the new platform has a newer version - but to move the wiki there's no way around installing two versions on one of the servers. Am I missing something?
Moving to an older wiki is not supported. You could install two mediawiki versions side by side, each with its own database but what you neeed is to update if you are moving to a server with an *older* mediawiki (moving to a newer mediawiki is not a problem, just run update.php, see the above sample)
From: Platonides@gmail.com Parker Jones wrote:
I have to move my wiki installation several times a year and it's always a laborious, time-consuming admin task. http://www.mediawiki.org/wiki/Manual:Moving_a_wiki
I was wondering if there were any plans to make it easier? Would it be possible to develop a script or admin functionality to automate the task - saying breaking it into just two steps: "Export entire wiki" and "Import wiki". It would backup/restore the database, copy any additional files LocalSettings, (uploaded images etc), ...
It's easy to do, but each sysadmin will have different needs and will thus need different scripts.
Thanks for your suggestion and scripts Platonides, I maintain a sequence of commands too. I think it comes down to different user groups: some people maintain a large mediawiki installation for an organisation/company/club (usually sys-admin-/db-admin types), others use it as a personal wiki. The latter group is not a regular admin type, so a sequence of admin steps is not really appropriate.
Another problem I encounter is that one platform has an older version of mediawiki and the new platform has a newer version - but to move the wiki there's no way around installing two versions on one of the servers. Am I missing something?
Moving to an older wiki is not supported. You could install two mediawiki versions side by side, each with its own database but what you neeed is to update if you are moving to a server with an *older* mediawiki (moving to a newer mediawiki is not a problem, just run update.php, see the above sample)
Yes just as I thought, you need to two installations. For me this is a pain because the initial installation was from a package manager (apt) so a second manual installation is unavoidable. Makes perfect sense for large installs, but still too hairy for the personal wiki demographic.
Perhaps a LAMP stack is simply too heavy duty for a personal wiki. I have just discovered MediawikiLite which uses sqllite and nanoweb and I am now looking into that.
Cheers, Parker _________________________________________________________________ Singles online now! Browse profiles for FREE http://clk.atdmt.com/NMN/go/163036679/direct/01/
Parker Jones wrote:
From: Platonides Parker Jones wrote:
I have to move my wiki installation several times a year and it's always a laborious, time-consuming admin task. http://www.mediawiki.org/wiki/Manual:Moving_a_wiki
I was wondering if there were any plans to make it easier? Would it be possible to develop a script or admin functionality to automate the task - saying breaking it into just two steps: "Export entire wiki" and "Import wiki". It would backup/restore the database, copy any additional files LocalSettings, (uploaded images etc), ...
It's easy to do, but each sysadmin will have different needs and will thus need different scripts.
Thanks for your suggestion and scripts Platonides, I maintain a sequence of commands too. I think it comes down to different user groups: some people maintain a large mediawiki installation for an organisation/company/club (usually sys-admin-/db-admin types), others use it as a personal wiki. The latter group is not a regular admin type, so a sequence of admin steps is not really appropriate.
Another problem I encounter is that one platform has an older version of mediawiki and the new platform has a newer version - but to move the wiki there's no way around installing two versions on one of the servers. Am I missing something?
Moving to an older wiki is not supported. You could install two mediawiki versions side by side, each with its own database but what you neeed is to update if you are moving to a server with an *older* mediawiki (moving to a newer mediawiki is not a problem, just run update.php, see the above sample)
Yes just as I thought, you need to two installations. For me this is a pain because the initial installation was from a package manager (apt) so a second manual installation is unavoidable. Makes perfect sense
for large installs, but still too hairy for the personal wiki demographic.
You don't need a "install". Only an upgrade. Extract the new mediawiki code, place the old LocalSettings.php at its root (I think apt moves it to /etc/), move the contents of math and image. Import the old database (this step was missing in the script I sent earlier), then run maintenance/update.php
If you have done some particular setup or installed extra extensions, you may need to do some adjustment, but it should be straightforward.
mediawiki-l@lists.wikimedia.org