How to deal with DNS and MySQL clashes during various restore proceedures.

I have a rare and bizarre issue with a Raid Controller Card, caused me to lose about 10 websites hosted by virtualmin.

There are two servers that both have virtualmin installed on them. SeverA has the issue, 10+ websites are down. ServerB has no issue and we are moving content from ServerA->ServerB.

All of ServerA's home directories are backed up to the most recent version before it's crash on ServerB. I also have the /usr and /etc directory of the now-defunct ServerA on another server in our cluster, ServerD, which is a disk->disk backup.

All of ServerA and ServerB's databases are on ServerC, none of them are locally use. ServerA used to connect via a ssh tunnel to ServerC for all of it's virtual servers databases.

ServerA and ServerB correspond to ns1 and ns2 in our DNS resolution. All domains on serverA are slaves, hosted on SeverB and vise-versa.

Restoring ServerA is not very straightforward as I would have thought. For one, I do not have recent VirtualMin backups of the virtualhosts on serverA, just ALL the content of the /home directory and ALL the content of the /usr and /etc directory of ServerA on our disk->disk backup (ServerD), for two when I either try to RESTORE to ServerB one of the very OLD (from Oct 2008) virtualmin backups, there are mysql and dns clashes that prevent it. So I have to go through the rigmarole of backing up and removing the DNS entries and mysql users/databases, re-running the restore (or creation process), and then tweaking all the custom iterations of the dns settings and so on. It's very frustrating.

In addition to that, when restoring a domain, the GUID thing I did not get, so none of the cgi-bin suexec settings were correct, and so 500 server errors ensue.

So - now you understand my issues hopefully I can express what I think are some solutions and hopefully get some hints.

May I remind you that I've been asking for about a year now for a hot-swap feature anticipating these issue as our hardware is about 5 years old. Granted, it started off as a "load-balancing/cluster" approach but I would be very happy with a cleaner backup solution one that does not bring our server to peak CPU usage when it is running ( server comes to a complete crawl while"tarballing" and ssh'ing a 1.5 GB directory of just one of our media-rich hosted servers). 80% of my posts here have been related to this particular feature.

Basically, is there a way to restore or create a virtualmin host and override the clashes, or have it "take posession" or ownership/management of items that the virtualmin program is designed to note clashes for? When you create a server without DNS and without MySQL to avoid the clash. it is unclear how to help the server "take ownership" of these items...

Right now, I created a virtualserver and left the DNS and MySQL features unchecked - and it created itself fine. I moved the backed up home directory in place, and it is working fine but DNS and MySQL are out of the context of the server and virtualmin's management for it.

In addition, are there segments of config files in the /etc/ directory and the /usr/ directory of the defunct serverA that I can move to their corresponding places on serverB that will save the time of recreating each user on the servers?

I realize there may be things built into the command line and that you are not responsible for damaged caused by hardware failures and that you did not give any concrete commitment to the hot-swap backup feature...but I have very little time and a series of very disappointed users who have no service and I need to find the most reliable and efficient way to manage this.

If there is a how to, there are recommendations or approaches to this, there is any relief you can offer in the context of these issues...it would be really appreciated.

Sincerely, -Jeremy Ciaramella

Status: 
Closed (fixed)

Comments

One solution may be to create the virtual server without the DNS and MySQL features (as you did), and then turn on those features without actually creating the DNS zone or MySQL users, which both presumably already exist.

This can be done by editing the domain's file in the /etc/webmin/virtual-server/domains directory, and changing the dns=0 and mysql=0 lines to dns=1 and mysql=1. Then login to Virtualmin and for each domain go to Edit Databases -> Import Databases, and associate all the domain's DBs with it.

Does that help?