Restoring a whole server

I am currently hosting a site on a AWS EC2 server.

I have automated the restore/creation of a server from a daily backup, should the other fail. the only minor snag I’m getting is that in order to make the site operational i need to login to virtualmin and change the IP setting under the server to the new shared address.

Does anyone know of a script I could run at start checking that the shared address is selected if not changing it.

Or could you indicate which file this config is located in? I could then build it into a script.




It sounds like you have a good backup solution there!

In theory, when you restore the Virtual Server onto your backup server, it should begin to use the IP address settings from that particular server.

Are you saying that when you restore it, it’s still configured to use the old address?

One thing you may want to try is to verify that there’s no problems with your Virtualmin config… you can do that in System Configuration -> Re-Check Config.


Also, make sure you set the correct option in the Restore Virtual Servers / Other restore options block, under “IP address for restored servers”. If you select “Original IP address” there, it will not use the IP of your new server, but the old one stored in the backup.