Hello,
I have some accounts in cPanel and all accounts are enabled from backup legacy.
Exist a way to disable the backup legacy from a specific account using xmlapi?
I tried the following ways:
$xmlapi->api1_query("cpanel_account","Backups","toggle_user_backup_state", array('user' => 'cpuser', 'legacy' => 0) );
$args = array('user'=>'cpuser','BACKUPS'=>0);
$xmlapi->xmlapi_query('modifyacct', $args);
Thanks
Hello,
Thanks for contacting us. Please try this and let us know if it works:
$xmlapi->xmlapi_query('toggle_user_backup_state', array( 'user' => 'cpuser', 'legacy' => 0 ) );
Thanks,
David Nielson
cPanel developer
Hello,
Thanks for contacting us. Please try this and let us know if it works:
$xmlapi->xmlapi_query('toggle_user_backup_state', array( 'user' => 'cpuser', 'legacy' => 0 ) );
Thanks,
David Nielson
cPanel developer
Hello David,
I tried and returned:
Unknown App Requested for this version (0) of the api: toggle_user_backup_state
Thanks,
Daniela
David,
when I try from this way:
"$xmlapi->api1_query("cpanel_account","Backups","toggle_user_backup_state", array('user' => 'cpuser', 'legacy' => 0) );"
The returns is something like this:
Backups
toggle_user_backup_state
event
internal
1
1
But nothing change in WHM.
Hello :)
I've confirmed it works with the direct command:
whmapi1 toggle_user_backup_state user=username legacy=0
Could you post the full script you are using in CODE tags for review?
Thank you.
Hello :)
I've confirmed it works with the direct command:
whmapi1 toggle_user_backup_state user=username legacy=0
Could you post the full script you are using in CODE tags for review?
Thank you.
Hello!
Do you revew my code tags?
When I try through in browser with the follow command (
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.
Thank you.
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.
Thank you.
Hello guys!
The script work.
Thank you for your help and the help of ticket support's. You helped me find the solution.
Follow the correct line:
print $xmlapi->xmlapi_query('toggle_user_backup_state', array( 'api.version' => 1, 'user' => "username", 'legacy' => 1 ) );
It was enough to declare the version of the api in the arguments.
Thanks a lot :) ;-)
Daniela
Comments
10 comments