Description

This function creates a full backup.


Examples




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&arg-7=examplesshkey&arg-8-123456luggage&cpanel_jsonapi_user=username&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_module=Fileman&cpanel_jsonapi_func=fullbackup


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




$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', 'sshkey_name', 'examplesshkey', 'sshkey_passphrase', '123456luggage')); // Call the function.



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', 'sshkey_name', 'examplesshkey', 'sshkey_passphrase', '123456luggage']); # Call the function.


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



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


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.

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.

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.

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


The remote server's password.12345luggage
emailstring

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

The system does not provide confirmation if you do not pass this parameter.

This value defaults to undef.

A valid email address.user@example.com
portinteger

The port to use during the transfer.

  • When you pass ftp or passiveftp for the dest parameter, this value defaults to 21.
  • When you pass scp for the dest parameter, this value defaults to 22.
  • When you pass homedir for the dest parameter, the system ignores this parameter.

This value defaults to an undefined value.

  • 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.

This value defaults to the remote server account's default login directory.

A valid directory name.

Enter the directory relative to the FTP user's login directory. For example, enter /public_ftp not /home/username/ public_ftp.


/public_ftp
sshkey_namestring

The UAPI SSL::generate_key function or cPanel API 2 SSH::importkey function's SSH key's name value.

This value defaults to an undefined value.

A valid string.
examplesshkey
sshkey_passphrasestring

The SSH key's passphrase.

This value defaults to an undefined value.

A secure string of four characters or more.123456luggage

Returns

This function only returns metadata.