This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
internet:hosting:virtualmin_migrate [2019/03/31 10:46] 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: | ||
**Documentation**: | **Documentation**: | ||
Line 5: | Line 7: | ||
http:// | http:// | ||
- | ===== 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 |
- | When you migrate | + | * Set the **short** host name |
+ | * Make sure your **DNS matches** | ||
+ | * Set the **first DNS server** | ||
- | <note tip>If you are using WHMCS and the domain name is at ResellerClub, | + | **Webmin -> Networking -> Network Configuration -> Hostname and DNS Client** |
===== DNS Changes ===== | ===== DNS Changes ===== | ||
Line 17: | Line 21: | ||
http:// | http:// | ||
- | Lower the TTL well in advance of your migration: | + | Lower the TTL of the virtual server DNS well **in advance** of your migration: |
< | < | ||
virtualmin modify-dns --all-domains | --domain < | virtualmin modify-dns --all-domains | --domain < | ||
</ | </ | ||
+ | |||
+ | ===== Domain Name Registrar ===== | ||
+ | |||
+ | Verify you have the **ability to change the name servers at the domain name registrar**. | ||
+ | |||
+ | 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, | ||
===== 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 time, avoid migrating junk and minimize potential transfer issues. |
- | * 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 | + | |
- | * Delete any unused data | + | |
- | * Perhaps their mail was once hosted but is no longer | + | * Perhaps their mail was once hosted but is no longer |
===== 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] | ||
</ | </ | ||
+ | |||
+ | 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. | Make sure the web server restarts after migrating a domain. | ||
- | This will strip old PHP settings from the new Virtualmin server that will keep Apache from starting: | + | :!: You may need to **reboot the host server** to check that Apache restarts properly! |
+ | |||
+ | This will strip some old PHP settings from the **new Virtualmin | ||
< | < | ||
sed -i '/ | sed -i '/ | ||
- | |||
systemctl restart apache2.service | systemctl restart apache2.service | ||
- | |||
systemctl status apache2.service | systemctl status apache2.service | ||
</ | </ | ||
- | 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 -> < |
+ | |||
+ | ==== DNS ==== | ||
+ | |||
+ | Verify and correct: | ||
* **DNS SPF record** | * **DNS SPF record** | ||
- | * **nameserver | + | * **Name Server |
* **DNS Slave server** | * **DNS Slave server** | ||
- | * **domain plan and features** | ||
- | If the DNS slave server | + | === DNS Slave Server === |
+ | |||
+ | To correct or verify | ||
+ | |||
+ | - **Delete the DNS domain**, if it exists, | ||
+ | | ||
+ | - **Initiate a domain transfer** to populate all DNS records to the slave server | ||
+ | |||
+ | Primary | ||
< | < | ||
Line 84: | Line 111: | ||
</ | </ | ||
- | Lastly, reset the DNS TTL after verifying your DNS is all correct. | + | Slave DNS server: |
< | < | ||
- | virtualmin modify-dns --domain | + | rndc retransfer migrated-domain.tld |
+ | tail -200 / | ||
+ | </ | ||
+ | |||
+ | === DNS TTL === | ||
+ | |||
+ | Lastly, **after you are quite sure the DNS is all correct for the migrated domain**, reset the DNS TTL: | ||
+ | < | ||
+ | virtualmin modify-dns --domain | ||
</ | </ | ||
Line 95: | Line 130: | ||
virtualmin modify-dns --all-domains --ttl 14400 | virtualmin modify-dns --all-domains --ttl 14400 | ||
</ | </ | ||
+ | |||
+ | ==== 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 109: | Line 148: | ||
**Virtualmin -> < | **Virtualmin -> < | ||
+ | |||
+ | ===== Fix Filesystem Permissions ===== | ||
+ | |||
+ | < | ||
+ | virtualmin fix-domain-permissions --all-domains | --domain < | ||
+ | </ | ||
---- | ---- | ||
Line 119: | Line 164: | ||
http:// | http:// | ||
- | |||
- | ===== Change Hostname ===== | ||
- | |||
- | **Webmin -> Networking -> Network Configuration -> Hostname and DNS Client** | ||
- | |||
- | |||
===== Swap IP Address ===== | ===== Swap IP Address ===== |