Metakgp:SysAdmin/2018-03-12 Migration of the droplet from FRA1 region to BLR region
Jump to navigation Jump to search
Reason for migration[edit source]
The old droplet was in the FRA1 region. The new droplet is in the BLR region.
Changing the region improves the request response times for users inside India.
Steps to migrate the droplet[edit source]
Detailed instructions will be added to the GitHub repo for future reference. The below describes the steps in brief.
- On the new droplet, install docker and docker-compose, set up the wiki repo and build it
- Set the old wiki to read only mode. Your downtime would start ticking now
- Take a backup of the database(steps in the RUNBOOK) and also the peqp/ folder in /srv/static/ of the nginx container
- Add the old droplet's public key to authorized keys of the new droplet. This allows ssh access from the old droplet to the new one
- Use rsync to transfer the backup files (made in step 3) to the new droplet
- On the new droplet, access the mysql database in the mysql container (steps to be added in RUNBOOK shortly). Drop the metakgp_wiki_db database and create it. This sets up an empty metakgp_wiki_db into which the SQL file will be restored from the backup. Use the restore-from-backup.sh script to use the new database (detailed steps in RUNBOOK)
- Use docker cp to copy the peqp/ folder to /srv/static/ of the nginx container in the new droplet
- Down all the containers, delete the mediawiki volume, build afresh and bring all the containers up
Steps to migrate images[edit source]
- Download all the image files from the old droplet: use find and the filter -iname *.jpg -iname *.png
- Once the new wiki is up and working properly, run checkImages.php. This script will give you a list of images that are missing from the wiki
- The images that you downloaded need to be uploaded to the new wiki. Visit https://<WIKI_ADDR>/w/Special:BatchUpload. This page can also be seen on the Special Pages list as "Upload multiple files"
- On this page, upload all the image files that you downloaded from the old droplet. Ensure that the names are not changes for any file. These new images and their thumbnails will automatically show up wherever they once resided.
Note: To upload files, you need to be have the "upload file" permission. Maintainers, administrators and members of the "uploadaccess" group have this permission. Check the User Group Permissions page. Search for users with the upload permission and contact them to get these images uploaded to the wiki.
Update detailed steps in a migration.md in the repo