API: Configuring backups

From BrainyCP
Revision as of 14:24, 17 November 2021 by Alenka (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

 

Administrative functions require API root rights in order to use any login hosted on the server. If you do not have root rights, you can only use your login.
Incoming data marked with an asterisk are required.

Module

Function

Incoming data

Error variants

backup

Display backup jobs for the user.

list_jobs_backup

username (post or get) * - username;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
list_backup (post or get) * - constant, operation name;
user_edit (post or get) - List of backup jobs for the user;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Displaying an array of tasks', detail [array_list_job];
error: 100, mess: 'There are no jobs';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

backup

Display backup list

list_backup

username (post or get) * - username;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
list_backup (post or get) * - constant, operation name;
user_edit (post or get) - List of backups for the user;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'List backup', detail [array_list_backup];
error: 100, mess: 'The backup list is empty';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

backup

Create new backup task.

add_backup

username (post or get) * - username;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
add_backup (post or get) * - constant, operation name;
remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox);
local_path (post or get) * - default (empty).
When choosing local:
local_path (post or get) * - default (/).
When selecting remote:
remoteip (post or get) * - remote server;

           

remote_folder (post or get) * - remote folder;
type_auth (post or get) * - authentication type key, pass.
remote_port (post or get) * - remote port, for ftp, ssh
When selecting key:
public_key (post) * —public key;
private_key (post) * - private key. If pass is selected:
remote_login (post or get) * - remote login;
remote_pass (post or get) * - remote password (it is better to transfer post).
remote_port (post or get) * - remote port.
token - Token to the remote storage (empty by default):
compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch):
maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0):
speed_limit (post or get) * - default 0 (no speed limit). When choosing tar:
level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values ​​to choose from day, week, month: If week is selected:
select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month:
select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month);
time (post or get) * - backup start time example 21-20 (hours, minutes);
active (post or get) * - takes the value 1 or 0 by default inactive;
encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default.
list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default;
all_user (post or get) *:
1 - all users
user1, user2 (specific users).
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Added successfully';
error: 101, mess: 'The storage is not correct.', detail [array_list_story];
error: 102, mess: 'Compression method not specified';
error: 103, mess: 'Compression level is incorrect';
error: 104, mess: 'The period is incorrectly specified';
error: 105, mess: 'The time is incorrect';
error: 106, mess: 'The number of days is incorrect';
error: 107, mess: 'The days of the months are incorrect';
error: 108, mess: 'The ip of the remote server is not specified';
error: 109, mess: 'The folder on the remote server is not specified';
error: 110, mess: 'Invalid authentication type', detail [list_aunt];
error: 111, mess: 'You did not specify a public key';
error: 112, mess: 'You did not specify a private key';
error: 113, mess: 'You did not specify a remote login';
error: 114, mess: 'You did not specify a remote password';
error: 140, mess: 'Invalid user specified', detail [list_users];
error: 1000, mess: 'Another error'.

backup

Removing backup task.

delete_jobs_backup

username (post or get) * - username;
password (post or get) * - user password;
config (post or get) * - the name of the config to be deleted;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'The task was successfully deleted';
error: 100, mess: 'Select the task to be deleted';
error: 1000, mess: 'Error in deleting task'.

backup

Generate key.

generate_key

username (post or get) * - username;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
generate_key (post or get) * - constant, operation name;
name_conf (post or get) - the name of the config, from the list of tasks;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Created successfully.'. detail [array_key];
error: 100, mess: 'Error saving key'.
error: 118, mess: 'Config file not specified'.

backup

Backup restoring history.

list_restore

username (post or get) * - username;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
generate_key (post or get) * - constant, operation name;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Array of restoration'.detail [array_list_restore];
error: 100, mess: 'The recovery array is empty'.

backup

Edit backup task.

edit_backup

username (post or get) * - username;
edit_conf (post or get) * - the name of the config to edit;
password (post or get) * - user password;
backup (post or get) * - constant, module name;
add_backup (post or get) * - constant, operation name;
remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox);
local_path (post or get) * - default (empty).
When choosing local:
local_path (post or get) * - default (/).
When selecting remote:
remoteip (post or get) * - remote server;
remote_folder (post or get) * - remote folder;
type_auth (post or get) * - authentication type key, pass.
remote_port (post or get) * - remote port, for ftp, ssh

   

When selecting key:
public_key (post) * —public key;
private_key (post) * - private key. If pass is selected:
remote_login (post or get) * - remote login;
remote_pass (post or get) * - remote password (it is better to transfer post).
remote_port (post or get) * - remote port.
token - Token to the remote storage (empty by default):
compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch):
maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0):
speed_limit (post or get) * - default 0 (no speed limit). When choosing tar:
level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values ​​to choose from day, week, month: If week is selected:

                            

select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month:
select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month);
time (post or get) * - backup start time example 21-20 (hours, minutes);
active (post or get) * - takes the value 1 or 0 by default inactive;
encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default.
list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default;
all_user (post or get) *:
1 - all users
user1, user2 (specific users).
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Added successfully';
error: 101, mess: 'The storage is not correct.', detail [array_list_story];
error: 102, mess: 'Compression method not specified';
error: 103, mess: 'Compression level is incorrect';
error: 104, mess: 'The period is incorrectly specified';
error: 105, mess: 'The time is incorrect';
error: 106, mess: 'The number of days is incorrectly specified';
error: 107, mess: 'The days of the months are incorrect';
error: 110, mess: 'Invalid authentication type', detail [list_aunt];
error: 111, mess: 'You did not specify a public key';
error: 112, mess: 'You did not specify a private key';
error: 113, mess: 'You did not specify a remote login';
error: 114, mess: 'You did not specify a remote password';
error: 140, mess: 'Invalid user specified', detail [list_users];
error: 1000, mess: 'Another error'.

backup

Launching backup task.

create_backup

username (post or get) * - username;
password (post or get) * - user password;
config (post or get) * - the name of the config for backup;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Created successfully';
error: 100, mess: 'Incorrectly specified file to start backup';
error: 101, mess: 'Script execution time exceeded';
error: 1000, mess: 'Error while executing script'.
 
[[File:|16x16px|Значок]]

Other useful articles:

API: connection

API: monitoring

API: web server status

API: auto installer CMS

API: configuring backups

API: transfer between servers

API: antivirus

API: server settings

API: web server management

API: database

API: custom certificates

API: mailbox management

API: server information

API: mail

API: DNS zone management

API: traffic usage

API: client mailboxes

API: web server installation

API: logging

API: name server

API: host accounts

API: application manager

API: service certificates

API: CRON

API: process manager

API: network tools

API: FTP server

API: IP address manager

API: average load

API: MySQL processlist