Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Fileman::fullbackup

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

  1. gigamike

    gigamike Active Member

    Joined:
    Jan 14, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    51
    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 Active Member

    Joined:
    Jan 14, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    it seems to the home/$user directory.

    TIA
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,409
    Likes Received:
    1,954
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Yes, for the cPanel backup option, the archive is stored in /home/$username before the FTP transfer.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice