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:53] 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**: | ||
http:// | http:// | ||
+ | |||
+ | ===== 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 '' | ||
+ | |||
+ | **Webmin -> Networking -> Network Configuration -> Hostname and DNS Client** | ||
===== DNS Changes ===== | ===== DNS Changes ===== | ||
Line 9: | 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: |
< | < | ||
Line 27: | Line 39: | ||
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. | 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** | * **Disable any features not actually in use** | ||
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. | ||
Line 63: | Line 79: | ||
< | < | ||
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 ==== |
+ | |||
+ | :!: On the new Virtualmin server, check that the **default web site** has not changed: | ||
+ | |||
+ | **Virtualmin -> < | ||
- | **Virtualmin -> Server Configuration - Website Options -> Default website...** | + | ==== DNS ==== |
- | Also check: | + | 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 86: | Line 111: | ||
</ | </ | ||
- | Lastly, reset the DNS TTL after verifying your DNS is all correct. | + | Slave DNS server: |
+ | |||
+ | < | ||
+ | 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 | + | virtualmin modify-dns --domain |
</ | </ | ||
Line 97: | 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 111: | Line 148: | ||
**Virtualmin -> < | **Virtualmin -> < | ||
+ | |||
+ | ===== Fix Filesystem Permissions ===== | ||
+ | |||
+ | < | ||
+ | virtualmin fix-domain-permissions --all-domains | --domain < | ||
+ | </ | ||
---- | ---- | ||
Line 121: | Line 164: | ||
http:// | http:// | ||
- | |||
- | ===== Change Hostname ===== | ||
- | |||
- | **Webmin -> Networking -> Network Configuration -> Hostname and DNS Client** | ||
- | |||
- | |||
===== Swap IP Address ===== | ===== Swap IP Address ===== |