Other options for "Fileman"

Cassiano Aquino

Registered
Dec 7, 2017
3
1
1
Brazil
cPanel Access Level
Reseller Owner
Hi, i have been using Fileman-fullbackup for long time, and it´s great, but now i need to make backups only for databases and files ( my website files ).

Sorry, but i tried to find if theres is such option, but no luck.

Is there possible?

Thanks in advance!



Code:
for ( $row = 0; $row < count( $clientes ); $row++ ) {
    
    $IDVAR++;
    
    # Credentials for cPanel account
    $source_server_ip = $clientes[$row]['FTPhost'];  # Server IP or domain name eg: 212.122.3.77 or cpanel.domain.tld
    $cpanel_account   = $clientes[$row]['FTPuser'];  # cPanel username
    $cpanel_password  = $clientes[$row]['FTPpass'];  # cPanel password
    $cx[]             = $source_server_ip;
    
    
    $xmlapi = new xmlapi($source_server_ip);
    $xmlapi->set_debug(0);
    $xmlapi->password_auth(trim($cpanel_account),trim($cpanel_password));
    $xmlapi->set_port('2083');
    $xmlapi->set_output('array');
    
    
     $api_args = array(
                   'ftp',
                   $source_server_ip,
                   $ftpacct,
                   $ftppass,
                   $email_notify,
                   21,
                   '/'.$dir.'/'
                 );

    $query = $xmlapi->api1_query($cpanel_account,'Fileman','fullbackup',$api_args);
    
    
    $spitDebug  .= '--------------------------------------------------------------------------------------------';
    if( $query['data']['result'] == 0 ){
      
       $spitDebug .= "\n ACONTECEU UM ERRO AO FAZER O BKP \n ";
       $spitDebug .= $query['data']['reason'] . " \n ";
       #$spitDebug .= "<pre>";
       $spitDebug .= " \n  <".strtoupper($cpanel_account)."> \n" . print_r($query, true)."  \n";
       #$spitDebug .= "</pre>";
      
       $ListClientes .= "\n  ".$source_server_ip." - [FALSE]=[".$query['data']['reason']."]";
      
       $RetError  +=1;
      
    } else {
        
        $spitDebug .= " \n BACKUP EFETUADO COM SUCESSO! \n ";
        #$spitDebug .= "<pre>";
        $spitDebug .= " \n  <".strtoupper($cpanel_account)."> \n" . print_r($query, true)."  \n";
        #$spitDebug .= "</pre>";
        
        $ListClientes .= "\n  ".$source_server_ip." - [TRUE]";
        
        
    }
    
    $spitDebug  .= '--------------------------------------------------------------------------------------------';
    unset($xmlapi); 
    
    if( ($IDVAR%2)==0 ){
       sleep(3);       # Estava dando alguns problemas com contas que não concluiam o BKP, por isso coloquei este sleep(), com isso, o problema foi resolvido ( não faço ideia porque :P ).
    } else {
        sleep(4);      # Algumas contas estavam dando problema ( User root already has more than 'max_user_connections' active connections  )
    }

}
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

There are no API functions that support what you are seeking at this time, so you'd need to develop a custom bash script that makes use of the mysqldump and rsync utilities. Additionally, I encourage you to vote and add feedback to the following feature request if this is something you'd like to see supported directly through a UAPI function:

API for Databases Only and Files Only Backup

Thank you.