• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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