You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by Davide Cisco <da...@unipd.it> on 2024/09/25 13:49:17 UTC

Get a file with SFTP - incremental download

Hello,

in the Get a file with SFTP action you can specify a list of files as input
(from another pipeline) and select the option "Copy previous results to
args" to download only the files specified in that list.

How can I do the opposite, i.e.: provide a list of local files that I've
already downloaded, and then use this list to get the files that have NOT
already downloaded?

(I can't delete the files on the server after the download, also I would
like to avoid downloading the entire remote folder and comparing it with
the local folder...)

Thanks in advance for your help

DC

Re: Get a file with SFTP - incremental download

Posted by Davide Cisco <da...@unipd.it>.
Hi Michele,

I tried to setup a pipeline that builds the command (as explained in
https://stackoverflow.com/a/70018325) and launches it through the "Execute
a process" transform.

However, despite passing the correct parameters (directly in the command
line and not by using the arguments in fields), I can't get a list of
files, I have a "login denied" error instead. The same command launched at
an Ubuntu terminal works.

How can I fix this?

Thanks

DC

(P.S. discussion is still open for any other solution to the original
request...)


Il giorno mer 25 set 2024 alle ore 16:20 Michele Mor <m....@gmail.com>
ha scritto:

> Hi Davide,
> My very simple solution is to run a curl command and retrieve list of
> files on the FTP and compare to local list, then use the results to execute
> a download.
>
> Not very clever but it works.
>
> Hope it helps,
> Michele
>
> On Wed, 25 Sept 2024, 14:49 Davide Cisco, <da...@unipd.it> wrote:
>
>> Hello,
>>
>> in the Get a file with SFTP action you can specify a list of files as
>> input (from another pipeline) and select the option "Copy previous results
>> to args" to download only the files specified in that list.
>>
>> How can I do the opposite, i.e.: provide a list of local files that I've
>> already downloaded, and then use this list to get the files that have NOT
>> already downloaded?
>>
>> (I can't delete the files on the server after the download, also I would
>> like to avoid downloading the entire remote folder and comparing it with
>> the local folder...)
>>
>> Thanks in advance for your help
>>
>> DC
>>
>>

Re: Get a file with SFTP - incremental download

Posted by Michele Mor <m....@gmail.com>.
Hi Davide,
My very simple solution is to run a curl command and retrieve list of files
on the FTP and compare to local list, then use the results to execute a
download.

Not very clever but it works.

Hope it helps,
Michele

On Wed, 25 Sept 2024, 14:49 Davide Cisco, <da...@unipd.it> wrote:

> Hello,
>
> in the Get a file with SFTP action you can specify a list of files as
> input (from another pipeline) and select the option "Copy previous results
> to args" to download only the files specified in that list.
>
> How can I do the opposite, i.e.: provide a list of local files that I've
> already downloaded, and then use this list to get the files that have NOT
> already downloaded?
>
> (I can't delete the files on the server after the download, also I would
> like to avoid downloading the entire remote folder and comparing it with
> the local folder...)
>
> Thanks in advance for your help
>
> DC
>
>