Backup FTP pre-check

Version 1.42

Feature
Finished

When creating a DA backup that uses FTP, a new option has been added which will test the listing of the ftp information before the backups are created. This will save time in that the Admin/Reseller will know wrong information has been generated before waiting for all backups to be created. The internal default will be set to: backup_ftp_pre_test=1 and can be added to the directadmin.conf with a value of 0 if you wish to disable this feature. This feature relies 100% on the exit value of the script: /usr/local/directadmin/scripts/ftp_list.php /usr/local/directadmin/scripts/custom/ftp_list.php (if this exists, it will have priority) An exit value of 0 must be returned, else DA will throw an error when the backup job is created, before any Users are backed up. Note that during the implementation of this feature, a few bugs were found in the ftp_list.php and fixed (regarding exit codes). Also, more output is generated by the script in the event of non-zero return codes from ncftpls (eg: wrong path would be blank, so script now checks for code 3 and adds text) If you've customized your ftp_list.php, you must ensure that the exit codes are working properly. A value of 0 is required to pass the check. A non-zero value will abort the backup creation, and the output from the script will be immediately displayed to the Admin/Reseller in DA.

Interested to try DirectAdmin? Get a 30-day Free Trial!