You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by LowMemory <fe...@club-internet.fr> on 2008/03/15 14:29:18 UTC

RE: scp fileset and copy subdirectory/files issue

Hello,

I had the same trouble !
In my case adding sftp="true" to scp ant task solve the problem.

Regards,
LowMemory


Bizard Nicolas (KIRO 41) wrote:
> 
> Hi,
> i ran into the same problems, i think it's a bug...
> However, there is a simple workaround -> zip all the files, and then
> unzip remotely with sshexec...
> 
> Hope that helps. 
> Nicolas
> 
> -----Original Message-----
> From: Z W [mailto:mpc8250@gmail.com] 
> Sent: Thursday, January 24, 2008 6:00 AM
> To: user@ant.apache.org
> Subject: scp fileset and copy subdirectory/files issue
> 
> Hi
> 
> Ant 1.7 on Windows XP
> I wanted to transfer files from base directory and subdirectories.
> I have the following:
> 
> 
> <scp todir="le:path@${a_host}:${d_dir}"
> 
> knownhosts="${_host}"
> 
> verbose="true"
> 
> trust="true">
> 
> <fileset dir="${REPOSITORY}"/>
> 
> </scp>
> 
> 
> 
> The local directories structure is as on Windows:
> 
> F:\script\db\dbs
> 
> F:\script\db\pop
> 
> F:\script\db\pop\dat
> 
> F:\script\db\pop\util
> 
> 
> 
> All files inside F:\script\db\dbs are copied but files in subdirectories
> F:\script\db\pop, F:\script\db\pop\dat, F:\script\db\pop\util
> 
> were never copied. In fact, the scp looks like it got stuck once the
> last
> file of  F:\script\db\dbs is copied to remote directory.
> 
> 
> 
> Output
> 
>       [scp] Sending: gen.sh : 416
>       [scp] File transfer time: 0.0 Average Rate: ? B/s
>       [scp] Sending: gen_ora_.tar : 133120
>       [scp] ********* 100%
>       [scp] File transfer time: 0.45 Average Rate: 293,215.86 B/s
>       [scp] Sending: r3 : 29             <---------------------- last
> file
> copied and Ant scp task doesnt go back one level to opy files from
> F:\script\db\pop
>       [scp] File transfer time: 0.0 Average Rate: ? B/s
> 
> 
> 
> I tried other workarounds like
> 
> <fileset dir="${REPOSITORY}">
> 
> <include name="**/**"/>
> 
> </fileset>
> 
> and still it doesn't work.
> 
> 
> 
> Could someone show me what I did wrong ?
> 
> Any help is appreciated here.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/scp-fileset-and-copy-subdirectory-files-issue-tp15058824p16067805.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: scp fileset and copy subdirectory/files issue

Posted by LowMemory <fe...@club-internet.fr>.
I post a additionnaly info here, it may help somebody sometime... ;-)

scp ant task is helpful and allows to copy files to another computer.
But, copy ant task is more powerful in the sense that is only copies the
files that are more recent to the destination directory.

So that, in order to copy only recent files from a windows box to a linux
box I used the following workaround:
- configure samba on the linux box;
- synchronize a windows drive to the samba directory;
- use copy ant task to copy files from windows directory to the synchronized
windows drive !

Low Memory


LowMemory wrote:
> 
> Hello,
> 
> I had the same trouble !
> In my case adding sftp="true" to scp ant task solve the problem.
> 
> Regards,
> LowMemory
> 
> 
> Bizard Nicolas (KIRO 41) wrote:
>> 
>> Hi,
>> i ran into the same problems, i think it's a bug...
>> However, there is a simple workaround -> zip all the files, and then
>> unzip remotely with sshexec...
>> 
>> Hope that helps. 
>> Nicolas
>> 
>> -----Original Message-----
>> From: Z W [mailto:mpc8250@gmail.com] 
>> Sent: Thursday, January 24, 2008 6:00 AM
>> To: user@ant.apache.org
>> Subject: scp fileset and copy subdirectory/files issue
>> 
>> Hi
>> 
>> Ant 1.7 on Windows XP
>> I wanted to transfer files from base directory and subdirectories.
>> I have the following:
>> 
>> 
>> <scp todir="le:path@${a_host}:${d_dir}"
>> 
>> knownhosts="${_host}"
>> 
>> verbose="true"
>> 
>> trust="true">
>> 
>> <fileset dir="${REPOSITORY}"/>
>> 
>> </scp>
>> 
>> 
>> 
>> The local directories structure is as on Windows:
>> 
>> F:\script\db\dbs
>> 
>> F:\script\db\pop
>> 
>> F:\script\db\pop\dat
>> 
>> F:\script\db\pop\util
>> 
>> 
>> 
>> All files inside F:\script\db\dbs are copied but files in subdirectories
>> F:\script\db\pop, F:\script\db\pop\dat, F:\script\db\pop\util
>> 
>> were never copied. In fact, the scp looks like it got stuck once the
>> last
>> file of  F:\script\db\dbs is copied to remote directory.
>> 
>> 
>> 
>> Output
>> 
>>       [scp] Sending: gen.sh : 416
>>       [scp] File transfer time: 0.0 Average Rate: ? B/s
>>       [scp] Sending: gen_ora_.tar : 133120
>>       [scp] ********* 100%
>>       [scp] File transfer time: 0.45 Average Rate: 293,215.86 B/s
>>       [scp] Sending: r3 : 29             <---------------------- last
>> file
>> copied and Ant scp task doesnt go back one level to opy files from
>> F:\script\db\pop
>>       [scp] File transfer time: 0.0 Average Rate: ? B/s
>> 
>> 
>> 
>> I tried other workarounds like
>> 
>> <fileset dir="${REPOSITORY}">
>> 
>> <include name="**/**"/>
>> 
>> </fileset>
>> 
>> and still it doesn't work.
>> 
>> 
>> 
>> Could someone show me what I did wrong ?
>> 
>> Any help is appreciated here.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/scp-fileset-and-copy-subdirectory-files-issue-tp15058824p16084838.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org