Page MenuHomeMiraheze
Paste P277

(An Untitled Masterwork)
ActivePublic

Authored by Paladox on Feb 19 2020, 02:43.
Tags
None
Referenced Files
F1122671: raw.txt
Feb 19 2020, 02:56
F1122663: raw.txt
Feb 19 2020, 02:43
Subscribers
None
My plan for the migrations will consist of setting the wiki into read only mode, backing up the db (by copying it to the new db host), restoring the db from the import on the new db server, switching the wiki to use the new db server and making the wiki use the new cache proxy.
The below is a guide on the steps i will take to migrate wikis to the new infrastructure (note that not all steps have to be followed, but should be evauluated depending on size).
1. Set the wiki into read only, you can do this by setting wgReadOnly in LocalSettings to 'Wiki being migrated to the new infrastructure'.
2. Backup the db, you do this either on db4 or db5 (depending on where the db is), run the following `mysqldump --single-transaction --routines --triggers nameofwiki | gzip -c | ssh -i /home/dbcopy/.ssh/id_ed25519 dbcopy@db6.miraheze.org 'cat > /home/dbcopy/nameofwiki.sql.gz'`
3. Import the db by running `zcat <file_name> | mysql nameofwiki`.
4. Set the wiki to use the new db server by adding it to Database.php file using c3, you can follow https://github.com/miraheze/mw-config/commit/be07d4d46881db2ac239fb529199804e08bd4184.
5. In the DNS, cname the domain to use cp7, follow https://github.com/miraheze/dns/commit/1ab5b1f032c007c6fc8543467b0e1d017e2cc0f1, note that some wikis have custom domains that doin't point at us directly, rather they use mw-lb, you will have to cordinate with them to get them to use cp7.
6. Take wiki out of read only, not that users may be using cp[348] itermittently (cache). Users on mac may have to run `sudo killall -HUP mDNSResponder`.