Hello,The server is upgraded to the latest versions of webmin and virtualmin, and the API function of domain name recovery fails, “/usr/sbin/virtualmin restore-domain --source /root/xxxx.com.tar.gz --domain xxxx.com --all- features --shared-ip x.x.x.x;”
Prompt “starting restore…
Extracting backup archive file …
…done
Re-creating virtual server xxxx.com…
… could not work out the default IP address
restore failed!”
However, on the server control panel, Virtualmin–Backup and Restore–Restore Virtual Servers, the website is restored to normal.
Does the function of the domain name recovery API fail to work?
Webmin version 1.994
Usermin version 1.840
Virtualmin version 7.1
Authentic theme version 19.93.1
The current server has multiple domain names, and the server has 5 IP addresses, which are only used independently by the current server. I compared the old version of Webmin/Virtualmin server, the domain name is back to normal. Only newer versions of Webmin/Virtualmin have this problem.
The server has five consecutive independent IP addresses. The screenshot is the server’s network card configuration information.
On the old version of virtualmin/webmin server, the same network card configuration, the same system, the Restore-domain.pl function can work normally.
Also, at System Settings → Virtualmin Configuration → Networking settings , what do you have set for the “Network interface for virtual addresses” and “Default virtual server IPv4 address” ?
I think I probably know where the problem is. This backup information was backed up from another server. I use the command print “$d->{‘old_ip’}” to determine that the ip address is that of another server. So the new version of virtualmin/webmin can’t calculate the correct current server IP address when using the API to restore the backup, but I’m not familiar with the prel language, so I don’t know if this is the correct way to solve the problem. can you help me?
The new version of virtualmin/webmin has a premise that the API can be used to restore successfully. If the current server has created the website to be restored, the website can be restored normally by using the API at this time.
Would it be possible for you to attach an example backup to this bug report, or send it to me at jcameron@virtualmin.com , so I try a test restore or see what IP fields were set on the original system?
Ok I think I see the issue - the problem is really that Virtualmin cannot figure out the default IPv6 address for your system, because you don’t have any non-local addresses configured. Do you plan to use IPv6? If not, you should edit /etc/webmin/virtual-server/config and change the line ip6enabled=1 to ip6enabled=0
The next release of Virtualmin will add a --no-ip6 flag to the restore-domain command to help with this situation, and will make the error message clearer.