How to migrate only newer posts from one Mediawiki MySQL to another?
I dumped the MySQL database that one instance of Mediawiki uses. I migrated this database to another machine and reinstalled Mediawiki. The old machine is still running and getting new posts. How can I migrate only these new posts to the new machine? If a just do a new dump and migrate it to the new machine, it will work?
If there are no edits on your new wiki, you can just go ahead and do the full dump/import again:
At your old server:
mysqldump --user=USERNAME --password=PASSWORD --host=DB.MYWIKI.COM wikidb > dbdump.sql
At your new server:
mysql --user=USERNAME --password=PASSWORD wikidb < dbdump.sql
This will overwrite existing all tables.
If, for some reason, you need to export/import pages revised later than a certain date, it might be easiest to use the Recent Changes API to get a list of all pages recently changed, e.g. action=query&list=recentchanges&rcprop=title, and then export those pages via
Special:Export. You will get an XML dump, that you can then import via
Special:Import. When doing the dump, you can even specify that you only want changes after a certain date, like this:
Note the odd separator between pagenames:
%0A. See https://www.mediawiki.org/wiki/Manual:Parameters_to_Special:Export for more options when doing the export
- A Linux, Apache, MySQL, PHP (LAMP) stack is a combination of open source software that is typically installed together to enable a server to host dynamic […]
- MySQL is an the most popular open-source database management system, in most of hosting company its has been bundle by LAMP(Linux, Apache, MySQL, PHP/Python/Perl) stack. Another alternative […]
- MySQL is the world’s most popular open-source database. Despite its powerful features, MySQL is simple to set up and easy to use. Below are some instructions […]