Restore-domain.pl domain restore command does not work

SYSTEM INFORMATION
OS type and version CENTOS 7
Webmin version 1.994
Virtualmin version 7.1
Related packages SUGGESTED

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

Do you have this shared ip x.x.x.x added to your system?

yes,please check,thanks
Virtualmin—Addresses and Networking—Shared IP Addresses
Webmin–Networking—Network Configuration


Are you sure that that IP that you’re trying to use with --shared-ip is not in use with a reseller or as private IP for another virtual server.

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.

Did you also add any flags for the IPv6 address to that restore-domain command?

hello, no ipv6 added, only ipv4

Just to double-check - in your example command the --shared-ip value is x.x.x.x; . Is there actually a semicolon at the end?

Yes, I separated them with semicolons.

Sorry, but I haven’t been able to reproduce this issue.

Is there anything unusual about the shared IP, like being on the 127 network?


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.

Those all looked fine. Which was the last version of Virtualmin that this worked on?

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” ?

Hello, Here is the working version

Webmin version 1.973
Virtualmin version 6.15
Authentic theme version 19.73


configuration information


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 thank you i will send you an email

Thanks, I will take a look …

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

Then re-try the restore…

2 Likes

jamie,thank you so much,it work :heart:

1 Like

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.

1 Like