I have a domain split between two servers. One has the website, the other handles the email.
I’d like to merge the domain onto one server.
I already have the website on the new server, I need to import and add in the email now.
If I go to the old mail server and just select “Mail/FTP users and mail aliases” and back them up, then restore them on the new server, will that restore them into the current virtualmin domain that is set up without interfering with the website/server?
Is there anything else i need to also back up and restore for the email to work correctly?
Thanks,
Chris
Ubuntu Linux 22.04.1 (old server) to Ubuntu Linux 22.04.3
Virtualmin: 7.9.0
Webmin: 2.105
I don’t actually know? I think it’s going to probably complain about an already existing domain or want to remove it and recreate it, if you try to restore an existing domain. I think you’ll have to try it and see. I’d be surprised if the restore knows how to deal with an account merge like this; I think Virtualmin will probably even try to protect you from doing it, since it’ll look like you’re trying to overwrite an existing domain. But, I’m guessing, as it’s not something I’ve done.
When I’ve been in this situation, I just used the CLI API to recreate the users, and then copied their homes over with rsync. That allows for the majority of the move to happen while the old mail server is still in service, and then do a final rsync after shutting down Postfix on the old mail server to get the last of mail copied over.
I have never done this, and of course there are so many details and options I suppose — my gut reaction would be to keep the existing email server and manually copy over your website from the old server to the new – would it not just be the public_html directory tree and any (MySql) databases?
of course later you need DNS adjustments so the website is visible to the public, as well as any Lets Encrypt work you may need for the website HTTPS support
Weak servers that didn’t seem to be able to handle the traffic of both web and mail (tons of spam and mistyped traffic on my domain since I have the .com version of a university’s .edu domain).
There may have been another way to handle that, but everything seemed to work much more reliably after I split them up. My email server could get overwhelmed without affecting my web traffic.
But security is better too, you can hide the ip address of a web server using a proxy, but not a mail server.
I’m far from an expert on this stuff though, so take my statements above with a grain of salt
I’ve reverted to using Joe’s method, keeping the website set up and importing users, seems to be working better because I was running into database issues