restoring an account with xml-api

AL-Kateb

Active Member
Feb 27, 2010
28
0
51
Hello everybody, I'm trying to use the great API cPanel have for automating the process of creating and managing accounts and all that stuff.

now i have cPanel 11.25 and the function restoreaccount works for me but i have a question regarding it.

the information in the wiki isn't pretty clear as for restore type .. daily is 1? weekly is 2 and monthly is 3?

it's not mentioned anywhere what are the values for the 3 types of restore plus in whm i can specify few other options like whether i want to restore mysql databases or not, i can't specify that in the API as well?

and one more thing, say php is configured that the max execution time is 30 seconds while restoring an account might sometimes exceed that if the website has lots of data so what's the way to work around it? i did not try but i guess the php code will break out and print an error telling u that max execution time has been exceeded should i increase the max execution time? or there is another way?

thanks in advance
 

MattDees

Well-Known Member
Apr 29, 2005
416
1
243
Houston, TX
cPanel Access Level
Root Administrator
You may be able to change the max_execution_time inside of your script via:

PHP:
ini_set('max_execution_time', $some_large_integer);
This should allow you to adjust the max execution time.


As for the rest of your issues:

it appears that these parameters do exist but are not documented as of this point

a complete list of parameters available for the restoreaccount xml-api call follows:

'user' => $args->{'user'},
'restoretype' => $args->{'type'},
'restoreall' => $args->{'all'},
'restoreip' => $args->{'ip'},
'restoremail' => $args->{'mail'},
'restoremysql' => $args->{'mysql'},
'restoresubs' => $args->{'subs'},
 

AL-Kateb

Active Member
Feb 27, 2010
28
0
51
thanks for your quick reply
but what about the type? 1,2 and 3? which one is which is weekly ..etc

and btw i was trying it and i thought it should work cos i have cPanel 11.25 but i got this error "Unknown App Requested: restoreaccount" what would cause this issue? though the cPanel version i have is 11.25.0-R46156.
 

AL-Kateb

Active Member
Feb 27, 2010
28
0
51
the automatic updates are enabled how come i still have 11.25.0? and how do i upgrade
 

Infopro

Well-Known Member
May 20, 2003
17,090
518
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Important cPanel/WHM Version Number Designation Change

Please Note: Important cPanel/WHM Version Number Designation Change

As of July 28, 2010 the cPanel/WHM version number designations have been officially changed.

Version 11.25.1 is now designated 11.28 and version 11.25.2 is now designated 11.30.

These new changes were explained in some detail recently at the July 2010 - Quarterly Road map - Webinar direct from cPanel's PodCast Studio in Houston, Texas with speakers David Grega and Mario Rodriguez.

An official press release about these changes is forthcoming and can be accessed at this link as soon as it's made available to the Forum Team:
Important cPanel/WHM Version Number Designation Change (To be updated)

This post serves to update users who are subscribed to threads (where this message is posted) looking forward to upcoming enhancements in future versions of cPanel.