I don’t think there’s anything special about the setups. I think it’s the mail aliases that are causing an issue. I transfered a server without them and there were no problems and the ones that error out have their users on the remote site but not the aliases.
Try making a domain backup on the original server, copying the resulting file over to the new one, and restore the domain on the new server…preferably on the command line. I don’t know where to start troubleshooting this, and maybe doing the restore on the command line will provide more clues about what’s going wrong.
I get the same error when manually transferring the file and restoring it on the remote host.
If I do the restore in the GUI and de-select mail and FTP users I don’t get an error.
There were some changes in the backup code recently around the ssl files, and a bug related to ssl.ca restoration. Maybe this is related to that somehow.
@Ilia have you seen this? Any idea what’s happening here?
if (!$key) {
&error("Empty SSL key path (undef or empty)");
}
if (!-e $key) {
&error("SSL key does not exist: $key");
}
if (!-r $key) {
&error("SSL key not readable (perms/ownership): $key");
}
my $lref;
my $ok = eval {
$lref = &read_file_lines($key, 1);
1;
};
if (!$ok) {
# If read_file_lines() throws, this will show the file path in the UI
&error("Failed to read SSL key with read_file_lines: $key");
}
It’s because I set up opendkim, openarc and opendmarc on the receiving server so it mirrored the sending but I should have enabled DKIM in Virtualmin first before I manually tweaked everything.
It’s a bug that restoring a backup fails because of that, though. Backups and restores should always been really reliable and resilient even if something is different on the new system.
@Joe, I’m not sure offhand what’s causing it, but if I had a backup file and have it failing on my system, I could take a closer look and likely fix it—unless Jamie gets to it first.
Right now, though, I’m focused on wrapping up reworking the UI and trying not to get sidetracked, since switching between different kinds of work slows things down quite a bit.
@Pook, can you send it as a private message like @staff and attach a backup file for download? Try to find the smallest domain; we just need to see the problem.
I’m sure I caused it by not having DKIM enabled in virtualmin but setting opendkim, openarc and opendmarc up so everything worked but wasn’t enabled in the GUI.
I added this in to track it down;
if (!$key) {
require Carp;
&error("Empty SSL key passed to get_ssl_key_type()\n".
Carp::longmess("call stack:"));
}
Empty SSL key passed to get_ssl_key_type() call stack: at /usr/share/webmin/virtual-server/dkim-lib.pl line 780. virtual_server::get_dkim_pubkey(HASH(0x613493a77640), HASH(0x613495fb5d48)) called at /usr/share/webmin/virtual-server/dkim-lib.pl line 766 virtual_server::get_dkim_dns_pubkey(HASH(0x613493a77640), HASH(0x613495fb5d48)) called at /usr/share/webmin/virtual-server/dkim-lib.pl line 1116 virtual_server::add_domain_dkim_record(HASH(0x613495fb5d48), HASH(0x613493a77640), ARRAY(0x613497b9ef18), "/var/lib/bind/vs.com.au.hosts") called at /usr/share/webmin/virtual-server/dkim-lib.pl line 1085 virtual_server::add_dkim_dns_records(ARRAY(0x613498cc6e70), HASH(0x613493a77640)) called at /usr/share/webmin/virtual-server/dkim-lib.pl line 1414 virtual_server::save_domain_dkim_key(HASH(0x613495fb5d48), "") called at /usr/share/webmin/virtual-server/feature-mail.pl line 3240 virtual_server::restore_mail(HASH(0x613495fb5d48), "/tmp/.webmin/555563_1171196_1_restore-domain.pl/vs.co"..., HASH(0x6134959a2708), HASH(0x613490d96070), undef, HASH(0x6134966288a0), 0, undef) called at /usr/share/webmin/virtual-server/backups-lib.pl line 3164 virtual_server::restore_domains("/root/vs.tar.gz", ARRAY(0x613490db22d8), ARRAY(0x613490d95920), HASH(0x613490d96070), ARRAY(0x613490d962c8), undef, HASH(0x613490d814a0), 0, ...) called at /usr/share/webmin/virtual-server/restore-domain.pl line 471