Difference between revisions of "API: Configuring backups"
From BrainyCP
(2 intermediate revisions by the same user not shown) | |||
Line 101: | Line 101: | ||
| style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">config (post or get) * - the name of the config for backup;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">config (post or get) * - the name of the config for backup;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> | ||
− | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Created successfully';</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'Incorrectly specified file to start backup';</div> <div data-placeholder="Перевод" dir="ltr">error: 101, mess: 'Script execution time exceeded';</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Error while executing script'.</div> <pre data-placeholder="" dir="ltr" id="tw-target-rmn"> | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Created successfully';</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'Incorrectly specified file to start backup';</div> <div data-placeholder="Перевод" dir="ltr">error: 101, mess: 'Script execution time exceeded';</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Error while executing script'.</div> <pre data-placeholder="" dir="ltr" id="tw-target-rmn"> </pre> |
− | </pre> | ||
<div>[[File:|16x16px|Значок]]</div> | <div>[[File:|16x16px|Значок]]</div> | ||
|} | |} | ||
Line 108: | Line 107: | ||
Other useful articles: | Other useful articles: | ||
− | {| style="width: | + | {| style="width: 1058px;" |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_connection <font><font>API: connection</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Monitoring <font><font>API: monitoring</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Webserver_status <font><font>API: web server status</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_CMS_Autoinstaller <font><font>API: auto installer CMS</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Configuring_backups <font><font>API: configuring backups</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Transfer_between_servers <font><font>API: transfer between servers</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Antivirus <font><font>API: antivirus</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Server_configuration <font><font>API: server settings</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Manage_webserver <font><font>API: web server management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Databases <font><font>API: database</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_User_Certificates <font><font>API: custom certificates</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Managing_mailboxes <font><font>API: mailbox management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Server_info <font><font>API: server information</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Mail <font><font>API: mail</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Manage_DNS-zones <font><font>API: DNS zone management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Traffic_usage <font><font>API: traffic usage</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Client_mail <font><font>API: client mailboxes</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Webserver_Installation <font><font>API: web server installation</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Logging <font><font>API: logging</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Nameserver <font><font>API: name server</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_host-accounts <font><font>API: host accounts</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_App_manager <font><font>API: application manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Certificates_of_services <font><font>API: service certificates</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_CRON API: CRON]''' | + | '''[https://docs.brainycp.io/index.php/API:_CRON <font><font>API: CRON</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Process_manager <font><font>API: process manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Network_tools <font><font>API: network tools</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_FTP- | + | '''[https://docs.brainycp.io/index.php/API:_FTP-server <font><font>API: FTP server</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_IP-address_manager <font><font>API: IP address manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Load_average <font><font>API: average load</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_MySQL_processlist API: MySQL processlist]''' | + | '''[https://docs.brainycp.io/index.php/API:_MySQL_processlist <font><font>API: MySQL processlist</font></font>]''' |
|} | |} |
Latest revision as of 14:24, 17 November 2021
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: