Child pages
  • cPanel API 1 Functions - Fileman::fullbackup
Skip to end of metadata
Go to start of metadata

Description

This function creates a full backup.

Warning:

cPanel API 1 is deprecated. We strongly recommend that you do not use cPanel API 1. However, no equivalent function exists in our newer APIs.

Important:

In cPanel & WHM version 76 and later, when you disable the FileStorage role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/json-api/cpanel?arg-0=ftp&arg-1=example.com&arg-2=username&arg-3=12345luggage&arg-4=user%40example.com&arg-5=21&arg-6=%2Fpublic_ftp&cpanel_jsonapi_user=username&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_module=Fileman&cpanel_jsonapi_func=fullbackup

Warning:

We do not support this method. We strongly recommend that you use the command line example below instead.

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$create_backup = $cpanel->api1('Fileman', 'fullbackup', array('ftp', 'example.com', 'username', '12345luggage', 'user@example.com', '21', 'public_ftp')); // Call the function.


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $create_backup = $cpliveapi->api1('Fileman', 'fullbackup' ['ftp', 'example.com', 'username', '12345luggage', 'user@example.com', '21', 'public_ftp']); # Call the function.


Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Tag System (deprecated)


Warning:

In cPanel & WHM version 11.30 and later, cPanel tags are deprecated. We provide this example to help developers move from the old cPanel tag system to our LiveAPI system. We strongly recommend that you only use the LiveAPI system to call the cPanel APIs.

<cpanel Module="Fileman::fullbakup ( $FORM('dest','server','user','pass','email','port','rdir'))">

 Command Line
cpapi1 --user=username Fileman fullbackup ftp example.com username 12345luggage user%40example.com 21 %2Fpublic_ftp


Notes:

  • You must URI-encode these values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to cPanel API 1 documentation or run the cpapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the cpapi1 command:

    /usr/local/cpanel/bin/cpapi1

 Output (none)

This function does not return output.

Parameters

ParameterTypeDescriptionPossible valuesExample
deststring

The backup's transfer protocol or destination.

This value defaults to homedir.

  • scp
  • ftp
  • passiveftp
  • homedir
ftp
serverstring

The backup's destination.

Important:

This parameter is required if you specify scp, ftp, or passiveftp for the dest parameter.

A valid hostname or IP address.example.com
userstring

The username for the remote server.

Important:

This parameter is required if you specify scp, ftp, or passiveftp for the dest parameter.

A valid cPanel account's username.username
passstring

The password for the remote server.

Important:

This parameter is required if you specify scp, ftp, or passiveftp for the dest parameter.

The remote server's password.12345luggage
emailstring

Required

The email address to receive a confirmation email when the backup completes.

A valid email address.user@example.com
portinteger

 The port to use during the transfer.

Important:

This parameter is required if you specify scp, ftp, or passiveftp for the dest parameter.

  • 21 — The port for ftp and passiveftp transfers.
  • 22 — The port for scp transfers.
 21
rdir string

The directory on the remote machine that will store the backup.

Important:

  • This parameter is required if you specify scp, ftp, or passiveftp for the dest parameter.
  • Enter the directory relative to the FTP user's login directory. For example, enter /public_ftp not /home/username/ public_ftp.
A valid directory name./public_ftp

Returns

This function only returns metadata.