Hey guys i have this code that works greate to create a full backup
Now i need to create a code to restor the file. I made a seach and found nothing on restoring a full backup using the xml-api.
i know we can do it by command line using exec ....
But if there's any way of doing it with the cpanel API it would really make my day! Most of all PHP shell commands are blocked on my server for obvious reasons ... and i would really like it to remain blocked.
PHP:
$xmlapi = new xmlapi($_CONFIG['server']['ip']);
$xmlapi->password_auth($_CONFIG['server']['account'],$_CONFIG['server']['pass']);
$xmlapi->set_port('2083');
$api_args = array( 'ftp', $_CONFIG['server']['ip'], $_CONFIG['server']['account'], $_CONFIG['server']['pass'], $_SESSION['email'], 21, '/public_html/wma/module/backup/files/' );
$xmlapi->api1_query($_CONFIG['server']['account'],'Fileman','fullbackup',$api_args);
i know we can do it by command line using exec ....
Code:
# /scripts/restorepkg username
Last edited: