I don't write these requirements, I just try to comply.
We have two wiki installations named "spw" and "spw_public" that have slightly different PHP code sets. They live in different URLs. We want to make the display contents identical. The "spw" can be edited; the "spw_public" is read-only. These have separate underlying databases and images collections, etc.
The "spw" will always be the canonical source. The "spw_public" should look the same to site visitors, but it does not need to have any revision history.
What would be a good way to "sync" them? Is there a standard process for backing up and restoring a mediawiki installation, so that I could backup "spw" and restore it to "spw_public?"
Thanks and regards, Ray
Assuming you want to copy the database and images from "spw" to "spw_public" you could do:
- Backup Database: mysqldump --opt -u username -p spw > spw,sql - Copy Database: mysql -u username -p spw_public < spw.sql
Note that these assume your database names are "spw" and "spw_public". The time this takes depends on the size of your database. For example, our 15GB MediaWiki database takes about 15min to backup and 1 hour to restore.
For copying images you can do: rsync -av /path/to/spw/images/ /path/to/spw_public/images/
If you want an exact copy you can add the "--delete" option to rsync to delete files in "spw_public/images" not found in "spw/images". If you don't have many images being uploaded this should be pretty quick as it only copies any new/updated image file.
On 16 February 2016 at 13:05, Ray Paseur ray.paseur@armedia.com wrote:
I don't write these requirements, I just try to comply.
We have two wiki installations named "spw" and "spw_public" that have slightly different PHP code sets. They live in different URLs. We want to make the display contents identical. The "spw" can be edited; the "spw_public" is read-only. These have separate underlying databases and images collections, etc.
The "spw" will always be the canonical source. The "spw_public" should look the same to site visitors, but it does not need to have any revision history.
What would be a good way to "sync" them? Is there a standard process for backing up and restoring a mediawiki installation, so that I could backup "spw" and restore it to "spw_public?"
Thanks and regards, Ray
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
It's not that crazy a thing to do. Wikimedia cluster has https://wikitech-static.wikimedia.org/, a read-only copy of https://wikitech.wikimedia.org/, acting as a backup copy of documentation in case of a catastrophic outage.
According to https://wikitech.wikimedia.org/wiki/wikitech-static, it's set up using a few cronjobs that export and import the content of the wiki as XML. mw-files.sh and mw-xml.sh (mentioned by that page) can be found at https://github.com/wikimedia/operations-puppet/tree/production/modules/opens..., but I have no idea where to acquire a copy of import-wikitech.sh. :)
mediawiki-l@lists.wikimedia.org