# Migrating Server

**URL:** <https://forum.virtualmin.com/t/migrating-server/119459>\
**Category:** Help! (Home for newbies)\
**Created:** [February 28, 2023, 5:41pm UTC](https://forum.virtualmin.com/t/migrating-server/119459 "2023-02-28T17:41:17Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [February 28, 2023, 5:41pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/1 "2023-02-28T17:41:17Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Debian 11 |
| Virtualmin version | Latest (new install pending) |

Hello,  
We want to migrate our Debian 10 based Virtualmin server to a new server that will be Debian 11 based.  
The question is if we can keep the old servers hostname and domain on the new server.

We wanted to use the Virtualmin move virtual server feature to migrate everything from the old server to the new server. But I don’t think it is possible to have two servers configured as the same [hostname.domainname.com](http://hostname.domainname.com)

Another question is about our secondary nameserver. Our old Virtualmin server has a slave DNS server setup in a different datacenter and we will want to keep that slave server but have it associated with the new Virtualmin server.

I don’t know if I’ve explained this well so if you need more info just let me know.

Thanks,  
John

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [February 28, 2023, 8:31pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/2 "2023-02-28T20:31:25Z")

</div>

> [@jtomelevage](#):
>
> The question is if we can keep the old servers hostname and domain on the new server.

Yes.

Just think this through. Hard to give specifics for each individual setup. Just give the new server a different name in DNS. Generally only the web servers care about the actual name. When done, change the DNS.

---

<div class="post-metadata">

**Author:** ![calport](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/calport/32/44_2.png) [@calport](https://forum.virtualmin.com/u/calport)\
**Post date:** [February 28, 2023, 9:10pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/3 "2023-02-28T21:10:37Z")

</div>

> [@jtomelevage](#):
>
> But I don’t think it is possible to have two servers configured as the same [hostname.domainname.com](http://hostname.domainname.com)

It is possible to do that.

You could create a new Debian 11 server with the same hostname as the old Debian 10 server.

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [February 28, 2023, 9:33pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/4 "2023-02-28T21:33:58Z")

</div>

Hello @ID10T and @calport - Thank you both for the replies.

I did not know how to do this so I ended up setting up as follows:

Old Server (Debian 10): [name1.domain1.com](http://name1.domain1.com)  
New Server (Debian 11): [name2.domain1.com](http://name2.domain1.com)

The old server is the primary name server and also hosts 40 virtual servers with users and email. I want to replace this server and make the new server the primary name server so I can de-commission the old server.

I was hoping to use the Virtualmin migrate virtual servers to the new server from the old server.

On the old server I setup a A record for the new server [name1.domain1.com](http://name1.domain1.com) but so far installing Virtualmin on the new server results in a fail on DNS for [name2.domain1.com](http://name2.domain1.com). [Whatsmydns.net](http://Whatsmydns.net) can resolve the name [name2.domain1.com](http://name2.domain1.com)

Not sure what to do next.

---

<div class="post-metadata">

**Author:** ![tpnsolutions](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/tpnsolutions/32/69_2.png) [@tpnsolutions](https://forum.virtualmin.com/u/tpnsolutions)\
**Post date:** [March 1, 2023, 11:13pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/5 "2023-03-01T23:13:43Z")

</div>

@jtomelevage,

You could have kept the names identical as @calport pointed out, then migrate based on IP address.

Once complete, update the DNS so that visitors go to new server.

Alternatively, could have did the DNS swap first, then do the migration by IP address.

Even @ID10T method works too, but for the sake of your question, that doesn’t accomplish things the way you asked (though that’s actually how I do things, then I rename later if needed)

---

<div class="post-metadata">

**Author:** ![Gomez\_Adams](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gomez_adams/32/3221_2.png) [@Gomez\_Adams](https://forum.virtualmin.com/u/Gomez_Adams)\
**Post date:** [March 2, 2023, 11:46am UTC](https://forum.virtualmin.com/t/migrating-server/119459/6 "2023-03-02T11:46:15Z")

</div>

This is where having a spare domain name helps out a lot. I actually spend the 15 dollars for one just for this sort of thing as it saves a lot of headache.

- Buy the cheapest domain you can. Normally, they’re 10 to 15 bucks. You’re never going to renew it so it doesn’t matter what you call it. It’s solely for setting up the new server.
- Set up your new server’s OS.
- Using the throwaway domain you just bought, get Virtualmin on it and get everything updated.
- Do a full backup of the old server.
- Restore it to the new server.
- Shut down the old server.
- Remove the throwaway domain you set the new server up with and name the original server’s master domain as the new default.

Done.

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [March 2, 2023, 11:54am UTC](https://forum.virtualmin.com/t/migrating-server/119459/7 "2023-03-02T11:54:48Z")

</div>

> [@Gomez\_Adams](#):
>
> I actually spend the 15 dollars

I use this mob to get free domains like domain.cf and domain.ml.  
I use them for testing.  
[https://www.freenom.com](https://www.freenom.com)

---

<div class="post-metadata">

**Author:** ![Gomez\_Adams](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gomez_adams/32/3221_2.png) [@Gomez\_Adams](https://forum.virtualmin.com/u/Gomez_Adams)\
**Post date:** [March 2, 2023, 12:12pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/8 "2023-03-02T12:12:53Z")

</div>

Even better! 🙂

I’ll keep that in mind for the future. Thanks for the tip!

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [March 2, 2023, 12:25pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/9 "2023-03-02T12:25:03Z")

</div>

I just logged on there, there new register is down ☹ Hopefully back soon.

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [March 4, 2023, 12:52am UTC](https://forum.virtualmin.com/t/migrating-server/119459/10 "2023-03-04T00:52:02Z")

</div>

Hello @ID10T @calport @tpnsolutions @Gomez_Adams and all and thanks for the tips.  
I have migrated the virtual servers (40) to the new server and only had a couple PHP extension issues to sort out on the new server. All seems to be working with the only exception I can see is the slave DNS server is getting zones but no records.

Should I start a new thread for this?

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [March 4, 2023, 1:10am UTC](https://forum.virtualmin.com/t/migrating-server/119459/11 "2023-03-04T01:10:35Z")

</div>

Probably. But I just had issues because I didn’t have ports 10000 - 10010 open. Remote was on a network that specifically required it.

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [March 4, 2023, 1:45am UTC](https://forum.virtualmin.com/t/migrating-server/119459/12 "2023-03-04T01:45:13Z")

</div>

@ID10T - I have not checked this, but if the ports were not open would it be able to create the zones on the slave? The slave is getting the zones, but all records are zero.

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [March 4, 2023, 1:48am UTC](https://forum.virtualmin.com/t/migrating-server/119459/13 "2023-03-04T01:48:24Z")

</div>

Just thought it might be a quick check before a new thread. Also, did you check create master zones? If that doesn’t do it. New thread. 😉

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [March 4, 2023, 2:19am UTC](https://forum.virtualmin.com/t/migrating-server/119459/14 "2023-03-04T02:19:12Z")

</div>

@ID10T

> [@ID10T](#):
>
> Just thought it might be a quick check before a new thread. Also, did you check create master zones? If that doesn’t do it. New thread. 😉

Not sure if you mean on the master DNS (new server) or the slave DNS server. Where is this create master zones option? I’m presuming is it because there are master zones on the master DNS (new server) and on the slave DNS server the zones appear as slave - just all zero records.

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [March 4, 2023, 2:22am UTC](https://forum.virtualmin.com/t/migrating-server/119459/15 "2023-03-04T02:22:20Z")

</div>

[www.virtualmin.com/documentation/dns/slave-configuration/](http://www.virtualmin.com/documentation/dns/slave-configuration/)

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [March 4, 2023, 5:28pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/16 "2023-03-04T17:28:45Z")

</div>

@ID10T - That is the directions I followed setting up the master and slave except I am running Virtualmin on the slave instead of Webmin.

I will start a new thread on this. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![jtomelevage](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jtomelevage/32/8377_2.png) [@jtomelevage](https://forum.virtualmin.com/u/jtomelevage)\
**Post date:** [March 4, 2023, 6:09pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/17 "2023-03-04T18:09:32Z")

</div>

I wanted to shout out to the Virtualmin team for making the “Transfer Virtual Server” feature! This server migration went a hell of a lot better than I have experienced with other systems or by manually downloading and uploading files and backups!

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [May 3, 2023, 6:10pm UTC](https://forum.virtualmin.com/t/migrating-server/119459/18 "2023-05-03T18:10:15Z")

</div>

Closed on May 3, 2023, 6:10pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
