UESPWiki:Server Upgrade

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

These are tentative plans and procedures if/when the UESP server is upgraded or replaced in the future.

Transition Procedure[edit]

This is a basic plan for moving the site's data from one physical server to another server.

  1. Backup all files on the old server and copy to the new. Directory structure should be identical unless the OS/environment has changed on the new server (in which case work will have to be done to move things where they should be on the new server). The old server is still unlocked and running during this time.
  2. Setup and test new machine and ensure everything is working (web server, MediaWiki install, PHP cache, database replication, directory shares, etc...).
  3. Lock the old and new server to prevent any updates during the transition.
  4. Backup and transfer the databases and other required files from the old server to the new. We can transfer the bulk of the Wiki images in the first step step and only need to update any new or updated images. The backup can either be manual transfer via FTP or a combination of database replication and remote rsync. The latter is more work to setup but should allow a much shorter lock/downtime period. Even with manual backups this shouldn't take longer than an hour if done during off-peak hours.
  5. Test the new server to ensure the contents were properly transferred.
  6. Unlock the new server but keep the old server locked. The new server is now considered the primary site.
  7. Post a message on the old server to redirect people to the IP of the new server.
  8. Possibly add an automatic redirect of pages on the old server to the new server (test this first to see if its possible and how it works).
  9. Change the DNS entry of uesp.net to point to the new server's IP address. Technically this change takes up to 24 hours (or 72?) to be applied but it often takes much less. Hopefully any noticable interruption to the site is limited to less than a day.

Backup Files[edit]

Files that need to be backed-up and restored on the new server include:

  • User directories /home and /home2. This includes MediaWiki, the Wiki images and all other website files.
  • Custom startup and initialization scripts (should all be under /etc).
  • Databases (backup either by exporting/importing or through database replication).
  • Custom utility source installations in /virtual. If the OS is kept the same the source of these utilities can be simply copied and re-installed on the new server to keep the number of changes a minimum. Any significant change in OS/platform may require the appropriate version to be downloaded and installed from scratch. Records of exactly which custom utilities are installed and the installation process should be created for future use.

Remotely Copying Files[edit]

Files can be copied remotely using FTP, rsync over SSH, or with the scp command:

  scp user@uesp.net:/home/www/uesp.net/backup.tar.gz . 

Detailed Plan[edit]

  1. Create static backups on the old server of /home, /home2, and /virtual directories.
  2. Copy backups from the old server to the new server to a temporary location.
  3. Setup and install Php5.
  4. Setup and install eaccellerator.
  5. Setup and install lighttpd.
  6. Setup and install ImageMagick and freetype library.
  7. Setup and install mod_evasive and mod_limitipconn for Apache.
  8. Update the Apache configuration.
  9. Update the MySql configuration (mirroring off initially).
  10. Restore the main site backups (files and all databases).
  11. Test setup and ensure everything is working before continuing.
  12. Ensure new server edits are locked.
  13. Setup database and file mirror on the new server (the new server mirrors the old server).
  14. Copy any remaining settings (/etc/, ...).
  15. Monitor mirror status until ready to switch over.
  16. Lock edits on the main server.
  17. Create backup(s) and download to local computer.
  18. Let the new server catchup on updates.
  19. Disable mirroring from all backup servers.
  20. Disable replication on the new server.
  21. Ensure new server is working.
  22. Change uesp.net DNS entries to point to new server IP.
  23. Redirect all requests on the old server to point to the new server.
  24. Test and monitor site status. Ensure data is being properly pulled from the new site and not the old site.
  25. Once things appear to be working correctly the new site can be unlocked.
  26. Setup automatic backups on the new server.
  27. Setup mirroring once again on the backup servers using the new server.