Description

This function restores a backup to a directory.

Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$restore_files = $cpanel->api1('Fileman', 'restorefiles', array('public_html','file-myfile.tar')); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $restore_file = $cpliveapi->api1('Fileman', 'restorefiles' ['user', 'file-myfile.tar]); # Call the function.


<cpanel Module="Fileman::restorefiles ( $FORM('dir','file'))">




cpapi1 --user=username Fileman restorefiles public_html file-myfile.tar



./
 ./ssl/
 ./ssl/certs/
 ./ssl/certs/example.com.csr
 ./ssl/certs/example.com.crt
 ./ssl/private/
 ./ssl/private/example.com.old.1265939365.key
 ...




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

The directory into which to uncompress the backup file.

This parameter defaults to the user's /home directory.

Any valid directory name.public_html
filestring

Required

The database.

 

Any valid database name.

This parameter's values must start with file-*.


file-myfile.tar

Returns

This function returns a series file paths to the restored files.