User Tools

Site Tools


internet:hosting:virtualmin_migrate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internet:hosting:virtualmin_migrate [2019/03/31 10:55]
gcooper
internet:hosting:virtualmin_migrate [2019/04/02 08:45] (current)
gcooper
Line 1: Line 1:
 ====== Virtualmin - Migrate to New Server ====== ====== Virtualmin - Migrate to New Server ======
 +
 +See also **[[internet:hosting:virtualmin_dns]]**
  
 **Documentation**: https://www.virtualmin.com/documentation/system/migrate **Documentation**: https://www.virtualmin.com/documentation/system/migrate
  
 http://www.virtualmin.com/node/21919 http://www.virtualmin.com/node/21919
 +
 +===== Change Hostname =====
 +
 +Be sure your new Virtualmin host server is **properly configured before migrating** any virtual servers to it.
 +
 +  * Set the **short** host name
 +  * Make sure your **DNS matches**
 +  * Set the **first DNS server** as ''127.0.0.1''
 +
 +**Webmin -> Networking -> Network Configuration -> Hostname and DNS Client**
  
 ===== DNS Changes ===== ===== DNS Changes =====
Line 9: Line 21:
 http://blog.rimuhosting.com/2011/04/15/migrating-vps-with-virtualmin-multiple-dns-changes/ http://blog.rimuhosting.com/2011/04/15/migrating-vps-with-virtualmin-multiple-dns-changes/
  
-Lower the TTL well **in advance** of your migration:+Lower the TTL of the virtual server DNS well **in advance** of your migration:
  
 <file> <file>
Line 56: Line 68:
  
 ===== Verify the Migration ===== ===== Verify the Migration =====
 +
 +==== Apache Web Server ====
  
 Make sure the web server restarts after migrating a domain.  Sometimes, old bits get carried forward and will keep the web server from starting! Make sure the web server restarts after migrating a domain.  Sometimes, old bits get carried forward and will keep the web server from starting!
Line 65: Line 79:
 <file> <file>
 sed -i '/php_admin_value/d' /etc/apache2/sites-available/* && sed -i '/php_value/d' /etc/apache2/sites-available/* sed -i '/php_admin_value/d' /etc/apache2/sites-available/* && sed -i '/php_value/d' /etc/apache2/sites-available/*
- 
 systemctl restart apache2.service systemctl restart apache2.service
- 
 systemctl status apache2.service systemctl status apache2.service
 </file> </file>
  
-On the new Virtualmin server, check that the default web site has not changed:+==== Default Web Site ==== 
 + 
 +:!: On the new Virtualmin server, check that the **default web site** has not changed: 
 + 
 +**Virtualmin -> <primary/default domain> -> Server Configuration -> Website Options -> Default website for IP Address**
  
-**Virtualmin -> Server Configuration - Website Options -> Default website...**+==== DNS ====
  
-Also check:+Verify and correct:
  
   * **DNS SPF record**   * **DNS SPF record**
-  * **nameserver records**+  * **Name Server records**
   * **DNS Slave server**   * **DNS Slave server**
-  * **domain plan and features** 
  
-If the DNS slave server is not correct, delete any duplicate domain configuration on the slave server, then re-add the newly migrated domain to the slave DNS server:+=== DNS Slave Server === 
 + 
 +To correct or verify the DNS slave server configuration
 + 
 +  - **Delete the DNS domain**, if it exists, on the slave server 
 +  **(Re-)Add the newly migrated domain** to the slave DNS server 
 +  - **Initiate a domain transfer** to populate all DNS records to the slave server 
 + 
 +Primary DNS server:
  
 <file> <file>
Line 88: Line 111:
 </file> </file>
  
-Lastly, reset the DNS TTL after verifying your DNS is all correct.+Slave DNS server: 
 + 
 +<file> 
 +rndc retransfer migrated-domain.tld 
 +tail -200 /var/log/syslog 
 +</file> 
 + 
 +=== DNS TTL ===
  
 +Lastly, **after you are quite sure the DNS is all correct for the migrated domain**, reset the DNS TTL:
 <file> <file>
-virtualmin modify-dns --domain yourdomain.tld --ttl 14400+virtualmin modify-dns --domain migrated-domain.tld --ttl 14400
 </file> </file>
  
Line 99: Line 130:
 virtualmin modify-dns --all-domains --ttl 14400 virtualmin modify-dns --all-domains --ttl 14400
 </file> </file>
 +
 +==== Hosting Plan and Features ====
 +
 +Check that the migrated domain is on the **correct hosting plan** and that all **appropriate features are enabled**.
  
 ===== Default Site ===== ===== Default Site =====
Line 113: Line 148:
  
 **Virtualmin -> <domain> -> Server Configuration -> Website Options -> Default website for IP address?** **Virtualmin -> <domain> -> Server Configuration -> Website Options -> Default website for IP address?**
 +
 +===== Fix Filesystem Permissions =====
 +
 +<file>
 +virtualmin fix-domain-permissions --all-domains | --domain <yourdomain.tld>
 +</file>
  
 ---- ----
Line 123: Line 164:
  
 http://www.virtualmin.com/node/23491 http://www.virtualmin.com/node/23491
- 
-===== Change Hostname ===== 
- 
-**Webmin -> Networking -> Network Configuration -> Hostname and DNS Client** 
- 
- 
  
 ===== Swap IP Address ===== ===== Swap IP Address =====
internet/hosting/virtualmin_migrate.1554051316.txt.gz · Last modified: 2019/03/31 10:55 by gcooper