Migrating a site from another server: Difference between revisions
Jump to navigation
Jump to search
m Red moved page Migrating a site from another Tripany server to Migrating a site from another server without leaving a redirect |
No edit summary |
||
Line 29: | Line 29: | ||
<pre> | <pre> | ||
# framework rsync | # framework rsync | ||
cd /home/sites/www. | cd /home/sites/www.somedom.com/live/ | ||
rsync -a ./ -e ssh morein@82.94.91.78:/home/sites/www. | rsync -a ./ -e ssh morein@82.94.91.78:/home/sites/www.somedom.com/site/live/ --exclude-from=rsyncexclusion --stats -h -v | ||
# logs | # logs | ||
cd /home/sites/www. | cd /home/sites/www.somedom.nl/logs/ | ||
# processed stats | # processed stats | ||
/home/sites/ | /home/sites/server.edgarbv.com/site/sitestats/www.somedom.nl | ||
/var/log/apache2/awstats/* | /var/log/apache2/awstats/*somedom* | ||
# databases | # databases | ||
</pre> | </pre> |
Revision as of 19:59, 18 January 2017
Migrating from server A -> B Prepare for the migration: On A have a virtualhost temp.origdomain.ext On A have a virtualhost original.origdomain.ext On B have a virtualhost temp2.tripany.com On B have a virtualhost original.origdomain.ext On temp.origdomain.ext add the following to the virtualhost directives: RewriteEngine On RewriteRule ^/(.*) http://temp2.tripany.com/$1 [L,R] And reload the webserver. Then get the domain administrator to change the A record of temp.origdomain.ext to point to server B. After 2 days, all temp.origdomain.ext should be flowing to temp2.tripany.com. This virtualhost should point to the same DocumentRoot as original.origdomain.ext on server B. On Server A, add the following to original.origdomain.ext RewriteEngine On RewriteRule ^/(.*) http://temp.origdomain.ext/$1 [L,R] And again reload the webserver. Now all traffic that hasn't got the new A record will be chained to temp2.tripany.com (which shouldn't be much traffic after 2 days) and the rest will go directly to the new machine. Now all the remaining domain names in temp.origdomain.ext can have their SOA files edited so that they point to server B. Visitors with the old SOA information will be chained through, visitors with the new SOA information will be chained through to temp.origdomain.ext.
# framework rsync cd /home/sites/www.somedom.com/live/ rsync -a ./ -e ssh morein@82.94.91.78:/home/sites/www.somedom.com/site/live/ --exclude-from=rsyncexclusion --stats -h -v # logs cd /home/sites/www.somedom.nl/logs/ # processed stats /home/sites/server.edgarbv.com/site/sitestats/www.somedom.nl /var/log/apache2/awstats/*somedom* # databases