Cloning a Virtual Server under Virtualmin GPL

9 posts / 0 new
Last post
#1 Thu, 02/24/2011 - 08:56
glimmung

Cloning a Virtual Server under Virtualmin GPL

Hi,

I have a running virtual server which I need to clone in order to create a stagng area for further development.

Is there a way to "clone" an existing virtual server, complete with databases etc.? I can see how that would be tricky due to the potential for naming confilicts etc., but I don't suppose that I'm the only user ever to have had this need.

I have two virtualmin-managed servers, each acting as a DNS secondary to the other, and this seems to prevent me from restoring my backup from the first server on the second server even if I opt not to reestore DNS data, which seemed like the logical alternative. Being able to restore a virtual server under another name would be the perfect workaround.

Any ideas?

Thanks in anticipation,

PhilK

Thu, 02/24/2011 - 09:01
andreychek

Hmm, what error do you get when trying to perform the restore when disabling the DNS feature?

-Eric

Thu, 02/24/2011 - 09:23 (Reply to #2)
glimmung

Hi Eric,

Thanks for the quick response!

In the restore options I select "Features to restore = Only those selected below", select all, then deselect DNS.

"Show what will be restored" tells me "Server does not exist, will be re-created", which makes sense, and it does not mention DNS.

The restore then tells me: -

Starting restore of 1 domains from local file /blah/mydomain.co.uk.tar.gz ..

Extracting backup archive file .. .. done

Re-creating virtual server mydomain.co.uk .. .. a clash was detected : The DNS domain mydomain.co.uk is already hosted by your DNS server

.. failed! See the progress output above for the reason why.

It is quite correct in telling me that, but of course after restoring, I would be looking to rename it anyway!

HTH,

PhilK

Thu, 02/24/2011 - 09:28
Locutus

As a workaround, if that mydomain.co.uk is merely a slave domain on that server, you might just delete it for a test and later, if you need it again, re-create it and have it re-transferred from the master.

Aside from that, it appears indeed like a bug to me that existence of the DNS zone is checked even though BIND is not supposed to be configured during the restore.

Thu, 02/24/2011 - 11:49 (Reply to #4)
glimmung

Hi Locutus,

The source site is live, so I don't want to mess - but what you say suggests a usable workaround, which is simply to create a throwaway VM with Virtualmin, and use it to first restore and then rename the site, so I can back it up in a "restore-able" state.

I'll report back as to how that works out - that should sort me out, I think.

In the meantime, for the benefit of the next guy should I reporting this as a bug somewhere?

Cheers,

PhilK

Wed, 01/22/2014 - 15:20
ulrith

Hi!

After two years I have absolutely the same issue as glimmung, but worse: my new server is primary name server already has domain zones of the domains I'm transferring.

Despite I exlude 'dns' feature in backup and restore processes I get an error: .. a clash was detected : The DNS domain smirnov.la is already hosted by your DNS server

To delete zones before restoration of the backups is terribly bad idea.

Do you have any workaround or may be I can edit restore-domain.pl script?

Please advice...

Wed, 01/22/2014 - 17:00 (Reply to #6)
ulrith

Because of no answer I've found very ugly solution:

just to comment clashes check in file /usr/libexec/webmin/virtual-server/backups-lib.pl

Now restore script does not stop restoring but adding another domain section to the bing config file (the second one) and after that bind won't start (I need to remove sections added).

But this situation is better - I have secondary name server so temporary unavailability of bind does not hurt so much...

Thu, 01/23/2014 - 02:27
glimmung

Hi Ulrith,

It's a while ago now (!), but from memory my workaround was to use the throwaway VM trick - I restored the domain to the VM in its entirety (IOW, with DNS), deleted any unwanted services (including DNS), and backed up the "cleaned" version, which I could then restore on the target system.

I use Virtualmin Pro now, but I very much appreciate how easy it is to fire up a Virtualmin GPL instance for this sort of troubleshooting!

HTH

--

PhilK

Sun, 11/17/2019 - 18:16
imclean

When selecting only the features you want to restore there's another option you need to set.

In the section "Other Restore Options" find the option "Only create servers with selected features?". Make sure this is set to "Yes" or the options under "Features and settings" will be ignored.

Topic locked