Migration from Plesk11 to Virtualmin


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:

  • A tgz containing the vhost backup_vhost_date.tgz
  • A tgz containing the emil information? (not sure yet) called backup_mn_date.tgz
  • An XML file containing the details of the backup.
  • A directory containing two more files with stats and other info (I don't really care now given that the site works)

    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!

  • I’ve asked Jamie if he could chime in, as he would know what’s going on there… one of the questions he might ask is, “can I see a sample backup file?”.

    Would it be okay for him to look at the backup file you have there? Or if not, could you generate a backup that doesn’t contain any personal information?

    He’ll hop on here shortly though, and if he wants that backup, he’ll explain how to get it to him.


    Ah, it sounds like someone else just reported this too. There’s an open ticket regarding that here:


    Jamie is hoping to have a fix for that by tomorrow.


    Hi Actually that’s very good news! I cant access the link you posted (access denied) but tell me anything you need. I can provide you one small backup to test if needed.

    Thanks again.

    My bad, I didn’t notice that it was marked private.

    All it says really is that it is indeed a problem with this particular Plesk version, and that an update is coming out soon :slight_smile:

    But if Jamie needs a backup, I’ll let him know that you have one. Thanks!


    I’ve done some more work on this, and have created a further update to migration-plesk9.pl that better supports the Plesk 11 format(s). The updated file is attached - save it as /usr/{share,libexec}/webmin/virtual-server/migration-plesk9.pl and then run /etc/webmin/restart

    If you have a full backup that contains all the domains from the original system, you should create a separate ZIP file for each domain containing all its files in the domain-specific sub-directory.