-
Notifications
You must be signed in to change notification settings - Fork 12
Wiki Migration
Tom Hughes edited this page Aug 4, 2018
·
2 revisions
- Add
wiki
role to target machine - Do initial rsync of
/srv/wiki.openstreetmap.org
[can repeat as needed] - Stop chef on target machine
- Remove
/etc/cron.d/mediawiki-wiki_openstreetmap_org
on target machine - Remove
/etc/cron.daily/mediawiki-wiki_openstreetmap_org-backup
on target machine
- Stop apache on target machine
- Stop chef on source machine
- Set
$wgReadOnly
inLocalSettings.php
on source machine - Remove
/etc/cron.d/mediawiki-wiki_openstreetmap_org
on source machine - Remove
/etc/cron.daily/mediawiki-wiki_openstreetmap_org-backup
on source machine - Make mysql read only on source machine
FLUSH TABLES WITH READ LOCK;
SET GLOBAL read_only = 1;
- Do final rsync of
/srv/wiki.openstreetmap.org
[can repeat as needed] - Dump database on source machine
mysqldump --opt --skip-lock-tables --single-transaction --user=wiki-user --password "wiki" | lz4 -9 > wiki.sql.lz4
- Copy database dump to target machine
- Restore database dump on target machine
lz4cat wiki.sql.lz4 | mysql --user=wiki-user --password wiki
- Run chef on target machines
- Switch DNS over
- Make mysql read/write on source machine
SET GLOBAL read_only = 0;
UNLOCK TABLES;
- Remove wiki role from source machine
- Run chef on source machine
- Rebuild indexes on target machine
sudo -u www-data php /srv/wiki.openstreetmap.org/w/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php --reindexAndRemoveOk --indexIdentifier now
sudo -u www-data php /srv/wiki.openstreetmap.org/w/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipLinks --indexOnSkip
sudo -u www-data php /srv/wiki.openstreetmap.org/w/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipParse