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
Do the source and destination files happen to be on the *same* NFS filesystem? (eg /home ?)
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
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
Created attachment 614 [details] scp debug message when run in verbose mode
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)?
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
scp doesn't do incremental transfers, if you want that use rsync.