Upload files to another server using sFTP

Is it possible to upload a generated csv file to another server using sFTP?

These are the server side steps:

  1. Run a database query
  2. Export the query to CSV

The path of the csv should be another server through sFTP. Is there any way to achieve this?

@Teodor @George

Hi Nevil,

it should work with a cron job:

1 Like

We do not support ftp in Server Connect and there is also not really a need for it. As the user will have to wait on the outcome

As Marcel indicated you are much better off having a custom php script that is scheduled in cron job for that case.

Usually I would agree but the smallest interval of a Cronjob is 1 minute, and we need to fire it instantly. Waiting 1 minute is not an option for this use case. How can I achieve that using sftp? Or maybe a different safe method for that matter?

Could you explain your use case? You could use a PHP Script and start it with a second form on success of your Export.

https://www.php.net/manual/de/function.ssh2-sftp.php

1 Like