Am I missing it, or is there really no way to restore a backup with a new name? It would be really convenient to be able to make a copy of a domain for development on the same or another machine for testing purposes, but the only options I'm seeing for restoring are on the same name (which, in a Cloudmin environment with shared DNS means there's simply no way to restore without it replacing the production site). Taking it farther, a clone domain to another server Cloudmin function would be nice, and I thought there was one already, but I can't find it; there is a "Move" function, but once again that guarantees breaking the production site (we've discussed this one, I think, with regard to DNS in Cloudmin Services not allowing creation of a clone).
Command line virtualmin doesn't seem to make it possible either.
So, maybe this is just another facet of the Cloudmin Services DNS problem when making a copy of an existing Virtualmin domain using Cloudmin.
Note that even when disabling DNS in the features list during restore this error occurs (which is exceedingly bug-like):
Re-creating virtual server virtualmin.com .. .. a clash was detected : DNS zone virtualmin already exists on the services host
Comments
Submitted by JamieCameron on Sat, 01/24/2015 - 00:35 Comment #1
No, this feature doesn't exist currently - you would have to restore and then rename, or clone the domain to a new name and then move that.
OK. If I could get Virtualmin to restore without DNS enabled, I would be able to rename after the restore and then re-enable DNS. I don't really want to clone (or do anything other than backup) on the production system.
I'm not sure where to poke at the code to convince it to actually disable DNS on restore, but I guess that'd be what I'd need to fix to be able to do this. (Or maybe it's just a validation check that is overzealous and it's not actually planning to restore the DNS feature.)
OK, so disabling DNS just doesn't work. I disabled the Cloudmin services configuration temporarily, which allowed the domain to be restored successfully onto the new machine, but it created DNS records and re-started BIND, despite having that feature disabled. Which may be the root issue with all of the problems I've had restoring a domain, transferring a domain, etc. (Since with Cloudmin Services, the domain always already exists, and so if it ignores disabling DNS it'll never work.)
Submitted by JamieCameron on Sun, 01/25/2015 - 02:34 Comment #4
You should be able to do a restore without DNS by using the
restore-domain
API command with flags--all-features --except-feature dns --only-features
When the last one is set and the domain is re-created by the restore process, it will prevent the DNS feature from being enabled even if it was there on the source system.