Bug 844 - the client copy is over written during scp
Summary: the client copy is over written during scp
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: -current
Hardware: Other AIX
: P2 trivial
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-20 20:33 AEST by Nihar Biswal
Modified: 2004-09-11 13:18 AEST (History)
0 users

See Also:


Attachments
scp debug message when run in verbose mode (4.73 KB, text/plain)
2004-04-21 20:06 AEST, Nihar Biswal
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nihar Biswal 2004-04-20 20:33:34 AEST
Hi,

I am facing a strange error. While trying to scp a file to remote host, if the 
connection drops in the middle of a file transfer , the original file in my 
local host is getting over written with incomplete file.

Does any body has face this problem before ? I tried to search in the bug 
database. But no luck. Any help on this would be highly appreciated.

Thanks in advance.
-Nihar
Comment 1 Darren Tucker 2004-04-20 23:21:12 AEST
Do the source and destination files happen to be on the *same* NFS filesystem? 
(eg /home ?)
Comment 2 Nihar Biswal 2004-04-21 11:26:53 AEST
Hi Darren,

thanks for your response. No, the destination file is in a remote system in a 
separate directory. fyi, the source system is AIX 5.1 and destination system is 
Linux. Pls let me know if you need further info.

thanks.
Nihar Biswal
Comment 3 Darren Tucker 2004-04-21 13:08:25 AEST
Under normal circumstances the source file should not be modified.   Please do
this and attatch the output (use "Create a New Attachment") to the this bug:

ls -l sourcefile
scp -vvv sourcefile desthost:destfile
ls -l sourcefile
Comment 4 Nihar Biswal 2004-04-21 20:06:03 AEST
Created attachment 614 [details]
scp debug message when run in verbose mode
Comment 5 Darren Tucker 2004-04-21 20:33:09 AEST
Comment on attachment 614 [details]
scp debug message when run in verbose mode

>-rwxr-x---   1 scpuser scp       2675364 Apr 13 18:21 dbc01511.pip.test
[...]
>-rwxr-x---   1 scpuser scp       2675364 Apr 13 18:21 dbc01511.pip.test

The files appear the same size, I take it you did not have a problem with it
dropping out?  Can you repeat the process but simulate a dropout (possibly by
killing the "connect" command)?
Comment 6 Nihar Biswal 2004-05-05 14:04:52 AEST
Hi Darren,

Thanks for your help. I think I have found out the problem. The problem is in 
our batch job scheduling. The scp program is trying to send the file in the 
middle of the file generation. So the file is transfered in 2 cycles ( part by 
part). May be scp is transfering only the incremental part of the file in the 
second cycle and syncronizes the host file to whatever it has transfered in 
second cycle (just a thought). 

Do you agree on this ?

thanks again for your help.

-Nihar Biswal
Comment 7 Darren Tucker 2004-05-12 12:43:07 AEST
scp doesn't do incremental transfers, if you want that use rsync.