• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Copy service plan between servers

Hi solucionesuno,

actually, there is no "easy" way ( yet ), to export/import service/hosting - plans. But you may vote for such a feature for the Plesk Control Panel at:



But you still have the choice to export a service/hosting - plan with the help of CLI - commands ( => service_plan: Hosting Plans ):

Example:
Code:
plesk bin service_plan -x "Unlimited"
... which results in an output in XML - format of your depending service/hosting - plan at your command line.

This XML - content can now be used to create a XML-RPC API request, with which you are able to create a new service plan on your 2. server.


 
A very dificult task.

I think that it is a featured normally needed by all people that work with more than one plesk server.

OK i find this examples:

GitHub - plesk/api-examples: Plesk API-RPC usage examples

And this documentation.

Creating a Service Plan

I am trying to do it with
Code:
REMOTE_HOST=your-plesk-host.dom REMOTE_LOGIN=admin REMOTE_PASSWORD=password ./example.sh

My Xml post is

Code:
<packet>
<service-plan>
   <add>
   <domain-service-plan owner-login="admin" name="BASICO">

<service-plan-item name="asp">false</service-plan-item>

<service-plan-item name="cgi">true</service-plan-item>

.......

And i get this response

Code:
<?xml version="1.0"?>
        <packet version="1.6.9.0">
                <system>
                        <status>error</status>
                        <errcode>1014</errcode>
                        <errtext>Parser error: Request is invalid. Error in line 4: Element 'domain-service-plan': This element is not expected. Expected is ( name ).</errtext>
                </system>       </packet>

seems that my xml post is not well formated.
 
the sheme exported with

Code:
plesk bin service_plan -x "Unlimited"

is total different by the sheme for API call to create the service plan, so I have to rewrite all the XML to be compatible? o_O

seems that the way to do is get the information service plan also via API

Getting Information on Service Plans
 
Last edited:
@solucionesuno I have the same challenge and am looking at using puppet with this. Either via wrapper scripts that use the cli output to pipe through the API or some other way.
 
Back
Top