I have one domain that is missing on this system. Everything still functions, email, web, etc. When I go to Virtualmin, the domain does not show in the drop down list of Virtual Servers. There is now a 17 char number in that list, which when viewing the summary, has no domain name.
I am wondering if all Virtual Server configs are stored in /etc/webmin? What I would like to do is restore one of my backup copies.
Also, are all of the files in /etc/webmin owned by root:root?
If there is a more granular way to do this restore, such as restoring /etc/webmin/virtual-server I would appreciate that info.
Alternatively, is there a commandline to fix this?
That means something happened to the file in /etc/webmin/virtual-server/domains/<domain-ID>. Restoring that file will bring back the name and other info, if you have backups. You don’t need to do a full restore, and shouldn’t (as it’s big and likely would cause you to lose data since the last backup), you can just dig into the backup and pull out that one file.
We still can’t figure out how this happens sometimes (and since it’s so rare, we’ve never been able to reproduce, so it’s hard to fix). It would have to have been some sort of outage, like a reboot, power outage, or disk problem, I think.
It can be fixed without a backup (but I hope you have a backup!) by removing the broken file, and then using the Import feature in Add Servers->Import Virtual Server. That may not get everything right, but since the domain was created with Virtualmin and matches expectations for what Virtualmin thinks a domain looks like in all ways, it’ll be very close. (Things that can go wrong include limits and such if you’ve changed your Server Templates since it was created, or modified configuration for the domain from defaults.)
This old thread also talks about the problem and potential solutions:
That server is not on battery backup. We did have 3 power blips during higher winds last week. Not long enough to stop most systems. It did reboot at least once during that, so likely why. It may have rebooted 3 times, even before it was completely up from the previous power blip.
I can confirm that the 17 char number shown in Virtualmin was the right ID. The file was empty. I replaced it with the file from my backups and the problem is solved! Perfect and thank you. This is a very clean solution.
Write this off to a power blip. The blips were just a fraction of a second, not the longer automated 7 second or so resets our power company tries first.