• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Assigning plans to subscription through CLI. Add-ons can't be used when database limit is exceeded

Miguel_Tellería

Basic Pleskian
[Plesk 12.0.18 with Centos 6]

Dear all,

In a mass-migration scenario i am trying to automate the set of basic plans and addons after a mass migration with PMM.

First I obtained the information in the original machine launching /usr/local/psa/bin/subscription --info and parsing the output.

Then at destination I have defined some "base plans" + addons for extra mailbox sizes, number of databases etc. The idea is that subscriptions that exceed the "base database limit" should have automatically added an "extra database add-on plan".

I have everything ready, the information and the plans. However I am unable to apply them.

After PMM finishes the migration, all the subscriptions are in "customer mode" without any plans assigned.

To set a plan + addon I was thinking of doing it in the following steps:

/usr/local/psa/bin/subscription --switch-subscription example.com -service-plan <base_plan_name>
/usr/local/psa/bin/subscription --add-subscription example.com -service-plan <add-on_plan_name>

However after the first step i obtain the following messages:

Unable to accept the template: the following limitations are exceeded.
Description Requested Allowed
Databases 2 6

and when I try to set the add-on it tells me that the subscription is not linked to any plan.

I have tried without success:
- Giving both plans as parameters in the same command line
- Locking the subscription (when not linked to a plan) in order to unlock and syncrhronize it when the add-on was added.

I have run out of ideas, so I am condemned to set the plans through the web GUI (following the steps above that happen to work fine on the web but not on CLI).

I guess I could define a super-macro plan in which all subscriptions would fit and then, lock, choose the base plan and the addons and then unlock. But this seems very inelegant.

Regards,

Miguel Telleria
 
Back
Top