Manual talk:Moving a wiki
From MediaWiki.org
Please post support requests on Project:Support desk. Thanks, robchurch | talk 06:20, 13 January 2007 (UTC)
Contents |
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
[edit] Comments
[edit] Still in need of more detail
in the back up the database section the article states "you need to backup the database" which is not only fantastically obvious but also not terribly helpful. Recommend that we actually create instructions on HOW to do this. it wouldn't be hard to adapt these wiki instructions for backing up a wordpress mysql file.
http://codex.wordpress.org/Backing_Up_Your_Database
[edit] Which directory to back up?
Thanks Rob for the rewrite. It is good. Is it only the images folder that needs to be backed up? If so, maybe the guide could just be tweaked to explain this. Also, perhaps it could be extended to explain that this can also be used as an operations guide for backup & restore. --Mydoghasworms 19:47, 31 May 2006 (UTC)
[edit] Complete rewrite
A complete rewrite of this guide is available at Help:How to move a wiki to another server. After a user complaint in the #mediawiki IRC channel, I lashed out and rewrote the lot. Rob Church Talk 20:14, 30 December 2005 (UTC)
-
- link is broken 69.251.20.244 19:00, 17 February 2007 (UTC)
[edit] Questions
[edit] Only for upgrades?
Newbie question: is this only for a situation of moving a database from one database server to another? It seems like upgrading would do the same thing as moving a database, unless it's on a different server. --Mr alex hall 08:55, 7 Dec 2004 (UTC)
- It's for moving from one server to another. Upgrading doesn't require nearly as much effort, although you should still be making backups. Rob Church Talk 20:20, 30 December 2005 (UTC)
[edit] Getting the Help pages
Also, I'd like to install the Help: pages. How does one download data from Meta-wiki, or any mediawiki that one doesn't have admin privileges on? Drauh 05:20, 24 Dec 2004 (UTC)
- Use Special:Export with a list of page titles. Rob Church Talk 20:20, 30 December 2005 (UTC)
[edit] Null password
Tony: I'm working on a shell script to auto back up my wiki, is there a way to pass a null password to mysqldump? I've tried every thing like --password="" and "echo "" | mysqldump..."
- If you have a null password, normally you'd just not pass a password parameter. --brion 08:06, 18 Mar 2005 (UTC)
[edit] Preparing for download
When i want to export the database like the devs do, with cur, old and so, what are the commands? They don't export all tables, or? -- MichaelDiederich 23:12, 23 Mar 2005 (UTC)
- Using the command-line client for mySQL, you can specify a list of tables to be included. Third-party utilities such as phpMyAdmin allow you to exclude certain tables from dumps too. Rob Church Talk 20:20, 30 December 2005 (UTC)
[edit] Clearing the cache
I moved the URL location of my wiki. This resulted in wrong URL for the topics in the wiki. I found out that wiki was using a cache to speed up things. To clear the cache I removed all records from object_cache. Is there another option to clear the cache or this the way to do so? Please advice. J.C. Wesdorp (212.238.212.92 21:34, 12 July 2005 (UTC))
- That should work fine. If moving to a new server, however, check the value of $IP and $wgScriptPath in LocalSettings.php or links will be generated without the correct URL. Rob Church Talk 20:20, 30 December 2005 (UTC)
[edit] Temporary files
It looks like there's a bunch of stuff in the images directory that doesn't need to be backed up. The timeline and tmp directories seem to contain images generated by EasyTimeline -- they'll be regenerated if deleted. What about the temp and thumbs directories? Will they be regenerated, too? --MarcSherman 19:06, 22 July 2005 (UTC)
- Temp does not need to be preserved at all. Thumbs can be discarded, but you should then also clear the parser cache to ensure that they are regenerated when pages using them are re-rendered. --brion 09:48, 23 July 2005 (UTC)
[edit] Shared hosting
What about remote webhosting. How can simple users backup all their data and move the wiki to a new server/location if they cannot run shell scripts?
- For these situations, I find third party tools such as phpMyAdmin do an adequate job; indeed, I prefer using it to the command-line client at times. Rob Church Talk 20:20, 30 December 2005 (UTC)
-
- You can not import using phpMyAdmin, can you?
[edit] Database Restore
Hi, I'm running a mediawiki 1.5.5 on my workstation at work. Quite unexpectedly, my workstation was swaped out without any notice. I did have a copy of my wiki installation and the MySQL/data/wiki/ folder with the wiki database in it saved on a network share from a week prior. After installing L.A.M.P. back on the new workstation (mysql 4.1, just like the old workstation) I tried to drop in the old \data folder hoping everything would work, but it doesn't. phpMyAdmin gives the following:
-
- #1016 - Can't open file: 'archive.ibd' (errno: 1)
Please help!
--bryce
P.S. - Let me know if this isn't the right place to post this, I couldn't find a help forum anywhere.
[edit] Reply
The wikidb database is an InnoDB database. The archive.idb isn't a real file, it's a virtual file within /var/lib/mysql/ibdata1. /var/log/mysqld.log should point you to http://www.innodb.com/ibman.html section 15.1, which in turn gets you to http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict.html for some background. Restore the top-level /var/lib/mysql files and you may be all set.
I'm not sure that this will fix your problem, but it's my best guess.
[edit] SQL syntax error after import
Hi, I'm running the newest mediawiki, and something went wrong with my previous installation (I got blank screen) so I exported the sql, reinstalled the newest wiki and got it working, and then overwrited the tables. When I set it up, it says:
Tietokantavirhe Tietokantakyselyssä oli syntaksivirhe. Syynä saattaa olla virheellinen kysely, tai se saattaa johtua ohjelmointivirheestä. Viimeinen tietokantakysely, jota yritettiin, oli: (SQL-kysely piilotettu) . Se tehtiin funktiosta ”Block::load”. MySQL palautti virheen ”1054: Unknown column 'ipb_anon_only' in 'where clause' (localhost)”.
Someone in the 'net suggested running maintenance/update.php from the command line, but it isn't an option, since all I have is a ftp connection, not ssh. Any suggestions?
--Timo H. / Finland
[edit] mysqldump
I just added an example command to back up the database using mysqldump. I'm a novice and don't know if this is sufficient; it would be lovely if someone could verify. Thanks - Tempshill2 18:26, 17 January 2006 (UTC)
Could someone add an example command for restoring the database? That'd be very nice :) Thanks --128.253.43.26 21:08, 7 February 2006 (UTC)
[edit] Can't import
So I followed the directions on exporting the wiki database, but I can't import in on my other server. I keep getting syntax errors with the import SQL. Is there a forum that I can go to and get help for this kind of trouble?
- Hi, prehaps some common errors should be mentioned here. You didn't mention the error number but the most common one is, that your mysql versions are not the same. In case you export the database with phpMyAdmin you can choose a compatible-mode. You should choose one which sounds like the version of your mysql on the destination server. Another common error is, InnoDB is not accepted. I worked around this by replacing InnoDB by MyISAM. I think its not the best way but it worked. (Most editors (kate) have a replace_all funktion included, I made use of this one). Lukas
[edit] Corrupt page titles after restore
I performed a backup of the database (using phpMyAdmin and also mysqldump) and then a restore and all the article titles that contained special Romanian characters were corrupted. Titles without special characters were not affected, and the body of all articles WITH or WITHOUT special characters were not affected. I'm running Wiki 1.6.3, source system is Linux with My SQL 4.1.19, destination system is Windows with My SQL 4.1.20
MySQL server collation is UTF-8, the database collation is latin1_swedish_ci, and columns are latin1_bin. I tried using the mysqldump --default-character-set=latin1 but that didn't work either.
- Hello. I've got the same problem with MW 1.5.4 and two GNU/Linux systems : before backup and after. Is there really nobody who knows the solution ?
- --Xiloynaha
[edit] Guarantees downtime
Doing it this way seems a bit amateurish as it guarantees downtime. I'm sure there has to be a better way, such as installing Mediawiki on the new host with the same settings, updating DNS to point there, and setting the new MySQL as a slave database until it's caught up? Then once DNS has propogated and the databases aligned, turn the old wiki off? I've no idea if this works in practice I might add :) --Kingboyk 18:10, 10 January 2007 (UTC)
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
[edit] Need more details
The instructions don't help, they just refer to other places... annoying indeed. 69.251.20.244 18:57, 17 February 2007 (UTC)
[edit] Can I import pages from a moinmoin wiki?
I have a little wiki with just one user (me) that I created with moinmoin. I'd like to import the content to my new MediaWiki. How can I do it?
[edit] Changing the folder's name post-install
Hi, this is my first post here, I will try to keep a high SNR.
@Before: a freshly installed MediaWiki 1.11 (upgraded from 1.6), labelled mediawiki-1.11.0 @after: a non-working MediaWiki 1.11 simply labelled mediawiki.
Removing the version number from the folder name broek the wiki. I modified LocalSetting.php (the $wgScriptPath variable) but it still does not work.
Here is the text I get:
Warning: require_once(/srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/includes/ProfilerStub.php) [function.require-once]: failed to open stream: No such file or directory in /srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/StartProfiler.php on line 3 Fatal error: require_once() [function.require]: Failed opening required '/srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/includes/ProfilerStub.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/d_latapie/www/www.latapie.name/htdocs/mediawiki-1.11.0/StartProfiler.php on line 3
Any idea on how to solve it? Thank you. David Latapie 06:32, 17 January 2008 (UTC)
- Hi - I have a similar problem. I just want to change my wiki folder's name, but it breaks everything. Do I have to do a SQLDump, delete the DB, reinstall and import... or is there an easy solution? Thanks, --Thekryz 16:19, 18 May 2008 (UTC)
In your LocalSettings.php file, look for any mention of the old name and replace it by the new name. It should work then. No pathes are stored in the database. -- Duesentrieb ⇌ 08:21, 19 May 2008 (UTC)
PS: Note that $wgScriptPath refers to the web path, while the error above is caused by a bad include path. The include path is stored in the variable $IP, which is usually atomatically set at the very top of your LocalSettings.php file. You can try to set it to the absolute (filesystem) path of your installation manually, just before the line saying $path = array... HTH -- Duesentrieb ⇌ 08:25, 19 May 2008 (UTC)
PPS: hm, actually... StartProfiler is special, because it's used before LocalSettings is even read. It doesn't use $IP at all. Since it's in the same directory as the index.php, it should always simply work. Hm... this *could* be caused by symlinking the include directory. other than that, I have no idea. -- Duesentrieb ⇌ 08:28, 19 May 2008 (UTC)

