The backup on the original server completed without errors and contains entries as below, showing the DNS data for relevant Virtual Server is copied.
Copying virtual server configuration .. .. done
Backing up Cron jobs .. .. none defined.
Copying records in DNS domain .. .. done
Saving mail aliases .. .. done
Saving mail and FTP users .. .. done
Backing up mail and FTP user Cron jobs .. .. none to backup
Backing up Dovecot control files .. .. done
Copying Apache virtual host configuration .. .. done
Copying Apache log files .. .. done
Copying Webalizer configuration files .. .. done
Copying Logrotate configuration .. .. done
Dumping MySQL database bizventures .. .. done
Backing up Webmin ACL files .. .. done
Backing up AWstats configuration file .. .. done
Creating TAR file of home directory .. .. done
However when restored only 4 of the 20+ Virtual Servers with "DNS Domain enabled" checked had their dns data restored. I used the commands exactly (replacing the correct path)
https://www.virtualmin.com/documentation/system/migrate
I have tried now since yesterday with multiple backups and still no dice so I am worried that other things may not have been restored correctly. How can I troubleshoot this issue.
My configuration is as follows
Original Server : CentOS 6 - Virtualmin GPL New Server : CentOS 7 - Virtualmin Pro * No errors thrown during backup or restore procedures.
I also want any previous restore to be completely overwritten by the latest restore which I notice also was not done as a previous Virtual Server (now deleted form the original server) was left on the new server after complete restore. I am sure this is just a command option I am missing.
Many thanks for any assistance.
Comments
Submitted by andreychek on Wed, 10/26/2016 - 12:27 Comment #1
Restoring a domain should definitely restore the DNS settings, and we can certainly troubleshoot why that's not working in your case.
If you look in System Settings -> Features and Plugins on the new server, is DNS enabled there?
Also, can you share the output you receive when restoring a domain that has this problem?
Submitted by apt_virtualmin on Wed, 10/26/2016 - 13:22 Pro Licensee Comment #2
Copying virtual server configuration .. .. done
Backing up Cron jobs .. .. none defined.
Copying records in DNS domain .. .. done
Saving mail aliases .. .. done
Saving mail and FTP users .. .. done
Backing up mail and FTP user Cron jobs .. .. none to backup
Backing up Dovecot control files .. .. none found
Copying Apache virtual host configuration .. .. done
Copying Apache log files .. .. done
Copying Webalizer configuration files .. .. done
Copying Logrotate configuration .. .. done
Dumping MySQL database kidsafemaryland .. .. done
Copying Procmail and SpamAssassin configuration files .. .. done
Backing up Webmin ACL files .. .. done
Backing up AWstats configuration file .. .. done
Creating incremental TAR file of home directory .. .. done
Restoring virtual server password, quota and other details .. .. done
Updating administration password and quotas .. .. done
Restoring Cron jobs .. .. done
Extracting TAR file of home directory .. .. done
Setting ownership of home directory .. .. done
Restoring Apache virtual host configuration .. .. done
Checking restored PHP execution mode .. .. mode FCGId OK for this system
Updating home directory in PHP configuration .. .. done
Restoring Apache log files .. .. done
Restoring Webalizer configuration files and Cron job .. .. done
Restoring Logrotate configuration .. .. done
Restoring allowed MySQL hosts .. .. done
Deleting old MySQL databases .. .. done
Re-loading MySQL database ..
.. done
Restoring SpamAssassin and Procmail configurations .. .. done
Restoring Webmin ACL files .. .. done
Restoring AWstats configuration file .. .. done
Re-creating mail and FTP users .. .. done
Re-creating mail aliases .. .. done
Restoring mail and FTP user Cron jobs .. .. done
Updating Webmin user .. .. done
Submitted by apt_virtualmin on Wed, 10/26/2016 - 13:21 Pro Licensee Comment #3
As a follow up to the above I just did a new backup on one of this same virtual server above from the original server. I then copied to the new server and this is the output from the restore operation showing what will be restored. You can see it notes DNS data
Then after completing the restore action below is the output (which you can see as before is missing the DNS restore procedure)
Applying web server configuration .. .. done
Re-loading Webmin .. .. done
.. restore complete.
Submitted by andreychek on Wed, 10/26/2016 - 13:35 Comment #4
Jamie, do you know what might be going on here?
It looks like it's intending to restore DNS data when the restore starts, but it doesn't actually seem to be doing so.
Submitted by apt_virtualmin on Wed, 10/26/2016 - 15:02 Pro Licensee Comment #5
Only other thing I can add is that all of these domains originally had DNS disabled and I was managing it manually in BIND from within Webmin. I recently deleted all these zones from BIND in Webmin and enabled the feature for each of the Virtual Servers which then re-added all the zones.
In short I did not have this feature enabled when the virtual server for each was first created, although that should not matter I thought I'd mention it.
Submitted by apt_virtualmin on Wed, 10/26/2016 - 16:45 Pro Licensee Comment #6
OK, I found the cause of the problem and a workaround to fix it. My scenario with workaround is documented below
As noted I believe this to be a bug as a new restore should "enable" any new features and "disable" any features deactivated as present in the backup being restored.
Submitted by apt_virtualmin on Wed, 10/26/2016 - 17:52 Pro Licensee Comment #7
OK, So I spoke to soon. MY approach above fixed the DNS issue but now I have an Apache issue were almost all the virtual hosts are missing. In looking in /etc/httpd/conf/httpd.conf which I have not touched, it is 100% managed by Virtualmin on this new server there was an error where a "virtualhost" tag was not closed causing all virtual hosts below it to not be recognized and Apache to not be able to restart. As the restore restarts Apache after every Virtual Server successful restore this leaves only the hosts created before the erroneous one offline.
I had found this issue once a few years back but thought I must have screwed something up so never reported it.
In light of being a bit concerned by this situation before making this new server live I am going do more testing by deleting all virtual servers again and looking at the httpd.conf file to see if it is clean and if not manually clean it and perform the restore again. I definitely understand there is a lot of moving parts here but just wanted to report in hopes of maybe helping someone else struggling with this down the road on a production server.
Submitted by andreychek on Wed, 10/26/2016 - 18:29 Comment #8
Yeah we'll have to get Jamie's input to know for sure regarding what the issues there may have been.
I see you have a few updates there -- are you saying that things are working properly for you now after your latest batch of restores?
Submitted by apt_virtualmin on Wed, 10/26/2016 - 19:56 Pro Licensee Comment #9
Yes I am good now, essentially the restores worked well when I did a complete delete of everything first and if you look above Step #6 I believe contains the source of the bug you should look at.
Submitted by JamieCameron on Wed, 10/26/2016 - 23:18 Comment #10
I think the cause is that the DNS feature in Virtualmin wasn't enabled when the backup was made, hence the records didn't get included in the backup or restored. Even though you created the domain in the BIND module manually, this isn't known to Virtualmin.
Submitted by apt_virtualmin on Sat, 10/29/2016 - 18:44 Pro Licensee Comment #11
I am not sure you read my report in full, I did later create the domains in Virtualmin after enabling the DNS feature so there is actually a bug in the backup sequence as it relates to the DNS when the DNS feature was not enabled from the beginning but later enabled.
Submitted by JamieCameron on Sun, 10/30/2016 - 11:44 Comment #12
My apologies - I see now. The "delete and re-create" option should be re-creating with the features from the backup, rather than what exists on the destination system.
For step 5 in comment #6, did you copy all the backup files (including those with .info and .dom extensions) to the new system?
Submitted by JamieCameron on Sun, 10/30/2016 - 14:26 Comment #13
Actually, I did some more testing and found the cause of this! A fix will be included in the next Virtualmin release.
Submitted by JamieCameron on Sun, 10/30/2016 - 14:26 Comment #14
Submitted by apt_virtualmin on Sun, 10/30/2016 - 14:28 Pro Licensee Comment #15
Yes, I did a full backup and copied the entire archive as I used the same backup to eventually solve my issue. The issue appears that the restore is not enabling new features added from a new backup (in may only be DNS as that is only one that affected me) unless you do a full delete of the virtual server first on the target server (not really ideal for production servers). Restoring to an existing virtual server appears to only restore those features that are "Currently" enabled on the target virtual server (regardless of what is in the backup) and thus ignoring any new features and the related data for that feature. Further even restoring (with new enabled features) after a full delete only worked 100% using the command line (not using Virtualmin web client)