I own a debian root web server at an ISP. By own I mean, I rent the server with a package, I do not own the hardware and such. No plesk or anything else. All configuration is done by hand (well, a self-written shell script does the dirty repetitive work).
This server is used as a development server, where many websites are run with different apache2 vhost settings, and databases on one mysql instance. It may be that the most of them are not touched in a long time, but then the customers want to make some changes and we need to work on them again. There are always 3 or 4 active development projects which run parallel. The servers do not have much traffic, only some developers, project managers, and the client.
With apache it is fairly easy to switch a vhost on and off, but it's not that easy with MySQL as I cannot deactivate a database. I could only drop it after some backup. But as it uses many InnoDB tables, I'm afraid I get into trouble when ressurecting the database. So I have many sleeping databases which may use RAM memory. I'm hoping I could prevent this, if I had a virtual settings with real virtual servers I could easily switch on and off
On my desktop computer (WIN10) it is fairly easy to do it with VirtualBox and the like to set up virtual servers (utilizing e.g. vagrant). But I don't know, if I can run VirtualBox or similar software on my webserver (no X system).
So here's the question: How (if possible) can I run virtual servers on a hosted webserver with root access?
If this is not possible, is there a secure way to backup/drop/restore entire MySQL databases with InnoDB tables?
I know, how to use vhost settings from apache. That's not, what I'm asking for.
There may be other benefits as well:
- Better security by encapsulating.
- Better flexibility by setting the servers properties for any instance for itself
- Better transportability by making a package out of the virtual server
- Better collaboration through that transportability