Hello!
I’m moving a lot of sites from a Plesk11 (11.0.9) server to virtualmin 3.97.GPL
The plesk backup creates 3 different files:
Until now the command virtualmin migrate-domain was failing complaining about not XML found:
Not a complete Plesk 9, 10 or 11 backup file - missing XML file
I’ve been following the code until I got to the file migration-plesk9.pl and somehow I deducted that the migration is expecting the XML file to be inside the tgz archive. I unpacked and repacked my backup including the XML file and got some results!
The domain, user, db? (need to check more carefully) and other configs where nicely created, but the cgis and webpages where not tranferred (/httpdocs and /cgi-bin directories inside the tgz)
The two lines taking care of this in the script are:
309 - local $docroot_files = &extract_plesk9_cid($root, $cids, "docroot");
322 - local $cgi_files = &extract_plesk9_cid($root, $cids, "cgi");
Both look like they’re calling to extract_plesk9_cid with code:
sub extract_plesk9_cid
{
local ($basedir, $cids, $type) = @;
local ($cid) = grep { $->{‘type’} eq $type } @$cids;
return undef if (!$cid);
local $file = $basedir."/".$cid->{‘path’}."/".$cid->{‘content-file’}->{‘content’};
-r $file || return undef;
local $dir = $main::extract_plesk9_cid_cache{$file};
if (!$dir) {
# Need to extract
$dir = &transname();
&make_dir($dir, 0700);
local $err = &extract_compressed_file($file, $dir);
return undef if ($err);
$main::extract_plesk9_cid_cache{$file} = $dir;
}
return $dir."/".$cid->{‘offset’};
}
Don’t caring about the cid_cache, I can’t figure out why this is not working, or where is it looking for the webpages and cgis. If someone can point it out for me, my migration will be MUCH less painfull (unpack, changes, repack, import)
Even better if someone can provide a patched script for Plesk11 would be amazing!
Also I have not mentioned the other tgz archive, the one suposedly containing the mail archives. Any tought on that direction is more than welcome.
PD:Keep in mind that I know some programming but I can’t really distinguish between Perl and an encrypted RSA file. (stolen to Keith Bostic)
Thanks a lot!