|If you're making custom changes to the ftp_upload.php, you'll want to know all the variables you get to play with.|
Below is a sample list of variables and values for a cron ftp backup, with ID number 1, for a single selected testuser:
This output was generated by doing:
Once created, run your desired backup with ftp, and it will throw an error, and you'll then see all the variables you get for that backup. Delete the custom ftp_upload.php, and create your own (or copy the default value from one directory above).
THe typical need for this would be if you want different backup IDs to take a different action. Say you want backup ID 1 to be uploaded via scp rather than ftp, this would let you add a line:
if [ "$id" = "1" ]; then
You can also do any check on any other variable, like username, password, remote IP, path, etc..
Note, if you use "When: Now", then no "id" will be passed.
But if you select an existing cron backup, and click "Run Now" for the existing cron ID, the id will be passed.
|How to convert ftp_upload.php to use ncftpput or curl instead of php|
|Manually testing the ftp_upload.php script|
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST