The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fileman::fullbackup

Discussion in 'cPanel Developers' started by gigamike, Oct 2, 2014.

  1. gigamike

    gigamike Member

    Joined:
    Jan 14, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    i created a script using the cpanel API v1 Fileman::fullbackup,

    PHP:
    $source_server_ip "blah"// Server IP or domain name eg: 212.122.3.77 or cpanel.domain.tld
    $cpanel_account "blah"// cPanel username
    $cpanel_password "blah"// cPanel password
    $cpanel_port '2083';

    $ftphost "blah"// FTP host IP or domain name
    $ftpacct "blah"// FTP account
    $ftppass "blah"// FTP password
    $ftpport '21';
    $ftpdirectory '/blah';

    $email_notify 'blah@blah.com'// Email address for backup notification

    ### DO NOT EDIT BELOW ###

    set_time_limit(0);

    $basePath dirname(dirname(__FILE__));
    require_once 
    $basePath "/library/xmlapi-php-master/xmlapi.php";

    $xmlapi = new xmlapi($source_server_ip);
    $xmlapi->password_auth($cpanel_account,$cpanel_password);
    $xmlapi->set_port($cpanel_port);
    $xmlapi->set_debug(1);

    $api_args = array(
        
    'passiveftp',
        
    $ftphost,
        
    $ftpacct,
        
    $ftppass,
        
    $email_notify,
        
    $ftpport,
        
    $ftpdirectory
    );

    $xmlapi->set_output('json');
    print 
    $xmlapi->api1_query($cpanel_account'Fileman''fullbackup'$api_args);
    it returns

    {"apiversion":"1","type":"event","module":"Fileman","func":"fullbackup","source":"module","data":{"result":""},"event":{"result":1}}

    how can i know if its creating a backup? Is there any directory that will create the backup temporarily on the server before it transfer via FTP?

    TIA,

    Mike
     
  2. gigamike

    gigamike Member

    Joined:
    Jan 14, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    it seems to the home/$user directory.

    TIA
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. alvarowe

    alvarowe Registered

    Joined:
    Apr 7, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ok, but when you are requesting remotely, besides waiting, how does the json data returned tells it all went right or not ???

    I've issued plenty of this fullbackup requests remotely, obtaining this result :

    Result:: {"apiversion":"1","type":"event","module":"Fileman","func":"fullbackup","source":"module","data":{"result":""},"event":{"result":1}}


    And no backup at all was really done neither FTP pushed of course :(
     
Loading...

Share This Page