plainblack.com
Username Password
search
Bookmark and Share
Subscribe

Moving sites between servers

This page details how to move a site to a new server.  It is very similar to existing site to wre.

Things to watch out for:

  1. The version of WebGUI must be the same on both servers.
  2. The new site will not work on the new server until you change DNS entries.  
    1. DNS entries have a TTL (Time To Live) that is usually several hours to a few days.
    2. A few days ahead of time, set the TTL to something short, like an hour, so the switch over can happen quickly.
  3. You should have the WRE and WebGUI installed and setup on the new site before you start the move.
  4. Make sure that any custom code is installed on the new site, along with any dependent perl modules.
Doing the move:
  1. Put the site into Maintenance mode, using the maintenanceMode script in /data/WebGUI/sbin.
    1. This prevents any changes from being made to the site while you do the transfer.
  2. Take a full database backup.
  3. Make a tarball of the uploads directory.
  4. Transfer over to the new server this list of files:
    1. database backup
    2. uploads tarball
      1. Be sure to also grab any SSL certificates and access log data that you don't want to lose.
    3. current modproxy file
    4. current modperl file
    5. current awstats file
    6. WebGUI configuration file
  5. On the new server, run the WRE's addsite.pl command to add a new site.
    addsite.pl --adminPassword=myPw --sitename=www.mysite.com
  6. Move the newly created WebGUI configuration file to the side, and put your original WebGUI configuration file in its place.
  7. Update these entries in the original WebGUI configuration file, copying the data from the new one to your original:
    1. dbuser
    2. dbpass
    3. spectreIp
  8. Install the database backup on top of the newly created database.
  9. Unpack the uploads tarball in the /data/domains directory.
  10. Copy any custom modproxy code from the original configuration file into the new one.
  11. modperl configuration files rarely have custom code, but check just in case.
  12. Handle the awstats configuration file in the same way.
  13. Take the site out of maintenance mode on the new site.
  14. Restart modproxy, modperl and spectre to make the new site live on the new server.
  15. Make the DNS changes.
    1. Users who have caching DNS servers will continue to see the "old" site in maintenance mode.  As they uncache, they'll see the "new" site which is live.

Keywords:

Search | Most Popular | Recent Changes | Wiki Home
© 2018 Plain Black Corporation | All Rights Reserved