Merging Plesk subscriptions

This article could have been called “Merging domains from one subscription to another” or “Moving domains between subscriptions”. But its goal remains the same. If you’re arrived at this page then you probably already know what you’re looking for.

With the business model change from Plesk 9 to Plesk 10, the upgrader splits each customer’s domains into it’s own subscription. Highly annoying if you want to keep track of a clients overall usage. What most Plesk users want is to merge all of a client’s subscriptions into a single subscription containing multiple domains, now possible with Plesk 10. Each client’s subscription consists of a “master domain”. Other domains can then be added to the subscription.

When asked, Parallels forum representatives have been dodging the issue since Plesk 10′s release, so there has to this day been no official way of merging subscriptions. The manual method seemed the only way.

What i’ve done is created a script to automate this for you. It’s been floating in my head for months but I finally got the motivation to sit down and put it together. Its not a complicated script and i’m not sure why Parallels haven’t done something similar.

This is what it does (currently) at a high level:

  1. Changes the database ownership of all the DB’s of the old domain to the new subscription.
  2. Backs up the files in the www root of the domain to be migrated.
  3. Backs up all mailboxes associated with the domain to be migrated.
  4. Gets a list of all the email accounts and associated passwords and dumps it to a file for use in a later step.
  5. Removes the old subscription.
  6. Re-creates the domain under the desired subscription.
  7. Reads in the email account list and recreates the mail accounts.
  8. Restores the files from the old domains www root.
  9. Restores the mailboxes.

I’ve tried to write this script so that it should work on most if not all Plesk supported Linux distributions. Sorry Windows folks! Nothing personal. It does make changes to the psa database directly so I would highly suggest backing up your psa database first. Although i’ve been using this script myself, i’d test it on your systems first on a dummy domain.

Once the script finishes executing, check the ownerships of the files in the new wwwroot as you’ll probably need to fix these before the site will work.

Here’s what it currently doesn’t handle:

  • DNS zones with modified entries. Use this script for domains with pretty much unmodified zones from your template, or take note of the changes you made manually and recreate them after the domain has been recreated. I have not yet found an easy way to dump the zone details of the domains and recreate them in an automated fashion.
  • Mailing lists. I personally don’t use the mailing lists so I haven’t included that yet.

This is only a version 1 so i’d love to hear your feedback and comments, even if you don’t find it useful, and especially if you DO. Also if you do end up making improvements, please let me know so that I can merge them into the script for the benefit of others.

Download

Changelog

  • v1.0 – Initial release.
  • v1.1 – Fixed bug with emaillist output file.

Unable to remove customer/subscription

When trying to remove a customer or subscription, you may get this error message in Plesk:

Unable to find service node for web service on domain with id=xxx

This was supposed to be fixed in 10.4.4 MU #13 but isn’t in all cases. I hit this error and the cause turned out to be because the subscription had no IP address assigned to it.

To fix this, go into the Hosting Settings of the subscription. Select an IP address, you’ll also have to reset the password.

Once you do this, you should be able to remove the customer and subscription.

Parallels Panel key update deferral notification

Updated 06/02/2012

For just under a year now i’ve been getting a daily mail from the Plesk daily maintenance script titled

Parallels Panel key update deferral notification

With the following in the body of the message.

Unable to update . An error occurred while processing your key. You can try updating it later.

This problem occurs when your license includes add ons for packages which aren’t installed on the system. This most commonly occurs due to the change in licensing of version 10.4 of Plesk. Since Kaspersky Anti Virus (KAV) was introduced into the standard Plesk 10.4 license, everyone’s keys were updated with KAV capability. Unfortunately the license key update handler does not handle the situation where KAV is not installed very well.

The following new microupdates released on 01/02/2012 solve the issue. 10.4 MU#15, 10.2 MU#15, 10.3 MU#17 and 10.0 MU#12.

While the MU solves the issue for KAV specifically, other modules still cause problems for the key handler, for example MagicSpam and the Game server module. Until Parallels can resolve the issue, you can work around the problem by making sure you have packages installed for all the addons you have associated with your license.