Process used to move sites from WS3 to WS0 12/2014

From GLMWiki
Revision as of 14:54, 9 December 2014 by Dhosh (Talk | contribs)

Jump to: navigation, search

WS3: Script to assemble tar file /home/dhosh/sitetar script:

 tar -czvf /home/dhosh/www.SITENAME.xxx \
 /var/www/server/www.SITENAME.xxx \
 /var/www/log/www.SITENAME.xxx \
 /var/www/awstats/*.www.SITENAME* \
 /etc/apache2/virtual_server_crt/www.SITENAME.xxx \
 /var/www/password/www.SITENAME.xxx \
 /etc/apache2/sites-available/www.SITENAME.xxx \
 /etc/apache2/sites-enabled/www.SITENAME.xxx \
 \ > sitetar.log
 scp /home/dhosh/www.SITENAME.xxx dhosh@ws0.gaslightmedia.com:/home/dhosh


Then on destination box (in this case, ws0) lll

 tar -xzf www.sierrasands.com -C /

On destination server: Kick apache to see new config file:

 apache2ctl graceful

Copy server section from original server: /etc/network/interfaces

  auto ethX:xxx
  iface ethX:xxx inet static
  address 66.129.xxx.xxx
  netmask 255.255.255.0
  network 66.129.xxx.xxx
  broadcast 66.129.xxx.255
  gateway 66.29.xx.254

.... to new server.

On original server: shutdown IP

  /sbin/ifconfig iface ethX:xxx 66.129.xxx.xxx netamsk 255.255.255.0 down

remove related apache config files

  rm /etc/apache2/sites/enabled/www.SITENAME.xxx
  rm /etc/apache2/sites/available/www.SITENAME.xxx

restart apache2 graceful:

  apache2ctl graceful


SSH to core1 and issue:

 clear arp 66.129.xx.xx

On desitnation server: enable new IP

  /sbin/ifconfig iface ethX:xxx 66.29.xxx.xxx netmask 255.255.255.0 


Test