Migration from cPanel can create duplicate servers

This is my set up:

Server1: Virtualmin
Server2: cPanel

Server1 contains domainB.com
Server2 contains domainA.com and within that account, domainB.com is added as an add-on domain to domainA.com

How to reproduce:
On server1 use the migration tool to migrate domainA.com onto that server.

What happens:
On server1, domainB.com is now listed twice - once as a top level server and again as a sub-server of domainA.com. This is a huge problem because:

  • It is confusing and a user could be configuring and/or deleting the wrong server
  • All of the configuration files (BIND options, mail settings, etc.) are either reset or changed to what domainB.com's settings were on Server2. I didn't want to test it extensively since it is a production environment, so I'm not sure which one it is.
  • When removing the sub-server, all of these configurations are permanently deleted

What should happen instead:
When migrating a cPanel backup, if a virtual server or sub-server already exists, the migration process should either exit with an error message or prompt the user for further action, such as skipping domains already there, renaming the duplicate domains, or choosing to ignore if they really want to mess things up.

Status: 
Closed (fixed)

Comments

Thanks for pointing this out - we will add detection of duplicate domain names during migration in the next Virtualmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.