Restore old server config to new server

SYSTEM INFORMATION
OS type and version EL 9 and 10
Webmin version 2.621
Virtualmin version 8.0.0
Webserver version Apache

Created a new VPS with AlmaLinux 10.1
Installed VMin 8, tested - works.
Backed up config from old server on Rocky 9.
Restored config to new server - no errors reported.
Checking Configuration fails.

your system is not ready for use by Virtualmin : A problem was found with your Postfix alias maps : The map source texthash:/etc/aliases cannot be used : Webmin does not support the map type texthash

Postfix on EL10 works differently to EL9

Solution:
After importing VMin config, convert Postfix maps to EL 10 format

sed -i ‘s/hash:/lmdb:/g’ /etc/postfix/main.cf
postalias lmdb:/etc/aliases
postmap lmdb:/etc/postfix/virtual
postmap lmdb:/etc/postfix/bcc
postmap lmdb:/etc/postfix/dependent
postmap lmdb:/etc/postfix/sni_map
systemctl restart postfix

Check Configuration now works.

Hi,

Surprising issue! Are you sure you have a clean standard Alma 10 system?

If so, what is the output of:

postconf -m

It’s a VPS provided image so could be modified. Postfix etc is all installed by VMin from the standard Alma repos.

postconf -m

cidr
environ
fail
inline
internal
lmdb
memcache
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix

This was not an issue when I used their Rocky 9 image, the only 10 image was AlmaLinux.

I found this:

Postfix in EL10 is built to prefer/use LMDB
Berkeley DB (hash:) is no longer included or not enabled by default.
postconf -m on a clean EL10 install typically shows lmdb but not hash.

Yet we do support lmdb out of the box—are you sure you used a new Virtualmin 8 repo and a new installation script to install it?

I used a VMin Pro script from Jan 31.

Has that changed?

I don’t know what that means. Which link or command did you use exactly to install it?

For Virtualmin Professional, use the download link provided on the My Account → Dashboard page.

Since then, nothing has changed! I need to take a closer look to see what’s going on.

To be clear, is this issue happening after a clean install on EL10 or after migrating a domain?

Or after manually copying configs?

Clean OS Alma 10.1, install VMin 8, Copy the virtualmin.tar.gz, restore. No domain created, restored or transferred at that point.

I don’t mind setting up 2 x VPS so you can play and test it yourself if you like.

I will make one EL9, the other EL10 and you can have at it for 28 days.

To get all of your server settings etc. do you not need to get the webmin backup and restore that.

On android I had this app where it would read the packages you had before an upgrade and then after that would install the same packages. This would be useful if you have to move server but want to keep the config the same.

No need. Can you share virtualmin.tar.gz with me privately if possible? It would make it easier.

That said, if we just copy the config files from the old system to the new one as part of restore, then the behavior is expected. @Jamie, is this what we’re doing?

Too many problems, going back to EL9.

I’m just trying Rock 10, just a bit confused in the restore with the Virtualmin configuration settings as i don’t see any/
The schedule backup shows

but when I do a restore its empty, backup has not settings.

@Jamie, could you comment on this?

No we merge some of the global configs from the old and new system - just copying over the whole /etc/webmin/virtual-server directory would not work, as some files are specific to the local system.

What about /etc/ for complete server migration, postfix setting, Apache setting and so on.

People have setups that have taken ages to get right. VM team always say migration. Is better but currently, I think upgrade is the only way to move to a new OS and keep all of your settings.

This also ties in with what a end user thinks is backed up (NB I know this has been mentioned on the forum before, but is relevant, here)

Thanks

To explain the original post better, EL10 has done away with the Berkeley DB hash system which was used by eg Postfix in EL9 and previous, so dumping /etc/ is what needs to be avoided.

Virtualmin has a responsibility to see that the things it looks after, users, mail, web, etc is migrated successfully.

I think personal customisation of the OS eg changing httpd settings to control the load etc are a separate issue.

@Randomz I hear you about not just dumping the etc folder, but some consideration to the settings within it when migrating to a new server using a migration path of virtualmin.

Maybe listing what exact configurations the virtualmin config stores and then configures on the new server.

At the very least you need to prep the new server to have the same services, which is not as automated as it could be.

Yes, we will fix that. Since we already know the source of the issue, it’s easy to patch.