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:48]
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
Line 5: Line 7:
 http://www.virtualmin.com/node/21919 http://www.virtualmin.com/node/21919
  
-===== Domain Name Registrar =====+===== Change Hostname =====
  
-Verify you have the **ability to change the name servers at the domain name registrar**.  If you do not have this access, you will have to **coordinate with someone who does**.+Be sure your new Virtualmin host server is **properly configured before migrating** any virtual servers to it.
  
-When you migrate the domain to a new Virtualmin server, you will probably migrate to new DNS servers as well.+  * Set the **short** host name 
 +  * Make sure your **DNS matches** 
 +  * Set the **first DNS server** as ''127.0.0.1''
  
-<note tip>If you are using WHMCS and the domain name is at ResellerClub, you can easily change the name servers in WHMCS.</note>+**Webmin -Networking -Network Configuration -> Hostname and DNS Client**
  
 ===== DNS Changes ===== ===== DNS Changes =====
Line 17: 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>
 virtualmin modify-dns --all-domains | --domain <domain> --ttl <seconds> virtualmin modify-dns --all-domains | --domain <domain> --ttl <seconds>
 </file> </file>
 +
 +===== Domain Name Registrar =====
 +
 +Verify you have the **ability to change the name servers at the domain name registrar**.  If you do not have this access, you will have to **coordinate with someone who does**.
 +
 +When you migrate the domain to a new Virtualmin server, you will probably migrate to new DNS servers as well.
 +
 +<note tip>If you are using WHMCS and the domain name is at ResellerClub, you can easily change the name servers in WHMCS.</note>
  
 ===== Clean Up Existing Virtual Server ===== ===== Clean Up Existing Virtual Server =====
  
-You may want to edit the existing virtual server before migrating it to shorten the migration time and avoid migrating junk.+You may want to **edit the existing virtual server** before migrating it to shorten the migration timeavoid migrating junk and minimize potential transfer issues.
  
-  * Verify the virtual server is on the correct plan+  * **Verify the virtual server is on the correct plan**
     * Plans are migrated with the virtual server     * Plans are migrated with the virtual server
-  * Disable any features not actually in use +  * **Disable any features not actually in use** 
-  * Delete any unused data +  * **Delete any unused or redundant data** 
-    * Perhaps their mail was once hosted but is no longer but old mail data remains+    * Perhaps their mail was once hosted but is no longer and old mail data remains
  
 ===== Transfer a Virtual Server ===== ===== Transfer a Virtual Server =====
Line 52: Line 64:
 virtualmin disable-feature --domain name | --user name | --all-domains [--disassociate] virtualmin disable-feature --domain name | --user name | --all-domains [--disassociate]
 </file> </file>
 +
 +Sometimes it helps to reboot the Virtualmin host server, perhaps both.
  
 ===== 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 63: 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 ====
  
-**Virtualmin -> Server Configuration - Website Options -> Default website...**+:!: On the new Virtualmin server, check that the **default web site** has not changed:
  
-Also check:+**Virtualmin -> <primary/default domain> -> Server Configuration -> Website Options -> Default website for IP Address** 
 + 
 +==== DNS ==== 
 + 
 +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 86: Line 111:
 </file> </file>
  
-Lastly, reset the DNS TTL after verifying your DNS is all correct.+Slave DNS server:
  
 <file> <file>
-virtualmin modify-dns --domain yourdomain.tld --ttl 14400+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> 
 +virtualmin modify-dns --domain migrated-domain.tld --ttl 14400
 </file> </file>
  
Line 97: 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 111: 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 121: 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.1554050931.txt.gz · Last modified: 2019/03/31 10:48 by gcooper