FAQ API Configuration & Customisation (v1.0, 1.1, 1.2)
This documentation applies to versions 1.0, 1.1 and 1.2 of the API, you can determine your API version via the 'API' section of your account
The myRepono API includes a number of customisable parameters which enable you to change how the API processes your backups.
To change these parameters, firstly download the myrepono.php API script from your server (or from myRepono.com) and open it in a text editor such as TextPad, UltraEdit or WordPad (do not use NotePad).
At the top of the myRepono API script (just below the license statement) you will see the following variables:
These variables are used as follows:
Your myRepono API Secret Key as provided in the 'API' section for your domain. This value will be automatically set when downloading the API.
Your myRepono API Password as provided in the 'API' section for your domain. This value will be automatically set when downloading the API.
Controls the maximum filesize for your backup packets. Be careful when increasing this value, 10MB is the optimal packet size for most servers since a larger filesize can cause the ZIP archive, compression or encryption processes to fail if the API is unable to complete the processes within the maximum PHP execution time allowed by your server. We recommend experimenting with this value to find what setting works best on your server. The value entered should be the number of megabytes as an integer, e.g. '10' represents 10 MB. This setting is used in association with the $api_packet_files value.
Controls the maximum number of files which can be included in your backup packets. Be careful when increasing this value, 250 files is the optimal packet file count for most servers since a larger number of files can cause the ZIP archive, compression or encryption processes to fail if the API is unable to complete the processes within the maximum PHP execution time allowed by your server. We recommend experimenting with this value to find what setting works best on your server. This setting is used in association with the $api_packet_filesize value.
Controls the maximum individual filesize which can be backed up. Files which do not meet the $api_packet_filesize limitation are not archived, compressed or encrypted and are transferred as they are, this setting limits the maximum filesize which may be transferred since large files (in excess of 100MB) can cause the backup process to fail due to timeout issues. We recommend experimenting with this value to find what setting works best on your server. The value entered should be the number of megabytes as an integer, e.g. '50' represents 50 MB
If enabled (set to 1) the API will create an Apache .htaccess file within the myRepono API directory. This .htaccess file adds an additional IP authentication stage for extended security. This option should be disabled (set to 0) if you are not using a server which is running the Apache Web Server software. If the myRepono API directory returns an internal server error, disable this setting and remove the .htaccess file created in the directory.
If enabled (set to 1) the API will use PHP's mcrypt function to encrypt the backup packets using Rijndael 256-Bit encryption. This encryption is extremely secure but the mcrypt function is very inefficient. If this function is enabled, it takes approximately 10 to 15 times as long to create your backup packets, therefore if your PHP script timeout value is too low (under 60 seconds) the API will be unable to encrypt the backup packets quickly enough, therefore you may need to reduce the $api_packet_filesize, $api_packet_files and $api_max_file_filesize values. This feature requires you have the PHP mcrypt library installed, if the option is enabled when mcrypt is not available then the default encryption will be used.
If enabled (set to 1) the API will use the command-line tool 'mysqldump' to generate mySQL database backups. The 'mysqldump' tool is more efficient than the default mySQL backup method and can be used to backup much larger databases, however mysqldump is not supported/offered by all servers. If your server supports 'mysqldump' then you can enable this feature, the $api_mysqldump_path value is used to define the server's path to 'mysqldump'.
The value represents the path to the command-line tool 'mysqldump', if the '$api_mysqldump' option is enabled (set to 1) then the '$api_mysqldump_path' value is used when calling the 'mysqldump' tool. Setting this to 'mysqldump' will usually be sufficient, however you may need to set a full path such as: /usr/bin/mysqldump
As part of the backup authentication process, the myRepono Backup API makes connections to myRepono.com during the backup process. If the $api_myrepono_https value is set to '1' these connections will always use the https protocol (SSL) to ensure all data transfer is secure, however since SSL connections require additional processing resources they can fail more regularly than standard (http protocol) connections. In this case the $api_myrepono_https can be set to '2' to only use the https protocol for critial connections which involve sensitive data, enabling the http protocol to be used for less sensitive connections. Or alternatively, the $api_myrepono_https value can be set to '0' to disable usage of the https protocol (SSL) and to only use the standard http protocol for all connections.
If enabled (set to 1) the API will generate a debug log file for troubleshooting and debugging purposes. We recommend this is only enabled by experienced PHP developers, if enabled please ensure you regularly remove the debug logs as these will not be automatically removed.
When you are done customising your API, simply upload it to your web site.
If you require any assistance customising the API or have any questions regarding it's configuration, please don't hesitate to contact us.