Import sites (files, virtualhost, users, mysql) from another server

3 posts / 0 new
Last post
#1 Thu, 05/23/2019 - 14:44
anibalardid

Import sites (files, virtualhost, users, mysql) from another server

Hi ! I have server without virtualmin/webmin , only lamp configuration, and virtualhosts created by myself.

I created new server with clean virtualmin/webmin installation. And I want to migrate all sites to this new server.

What is the best way to do that ? It is more than 4000 sites (and users, databases).

I have possibility to use cli, remote api, scp or whatever ;)

Or another option maybe install webmin/virtualmin in this working server , but sites is on /var/www folder and not in /home

Best Regards !

Thu, 05/23/2019 - 16:53
andreychek

Howdy,

What you're asking for there is possible, though it can be a bit tricky.

Virtualmin doesn't use home dirs in /var, and trying to force that goes a bit against the grain and could lead to some troubles. I'd recommend trying to move all that into /home if at all possible.

Once you're at a point where you have a compatible setup, you can use the "Add Servers" option in the navbar. The "Import Virtual Server" option allows you to import servers one at a time. That takes a website you have already setup on your server, and tells Virtualmin about it so that it can manage it.

In your case, with 4000 domains, you may want to look into the "Batch Create Servers" option, which allows you to upload a text file and import multiple domains at once.

I suppose what I might try is to install Virtualmin on the new server, start copying those sites over into /home, and then import them into Virtualmin in batches.

Trying to get Virtualmin working on your current server would be tough, as it's designed to be installed onto a fresh install of your OS, and may end up breaking things if you try to get that working on your current server.

-Eric

Wed, 05/29/2019 - 07:22 (Reply to #2)
anibalardid

Thanks ! There is no problem to change /var to /home ;) because now i have symlinks from /var/www to mounted volume =)

I'm thinking to use api cli to create one by one, or with batch

Topic locked