Friday, April 15, 2011

What happens to a file when the connection through SFTP is interrupted?

I need to implement a file transferring from a web server to a SFTP server. When the connection is interrupted during the file transferring, what happens to the bytes already transferred?

From stackoverflow
  • Unless the SFTP server has built-in capabilities to resume an interrupted transfer (not sure if this exists, if it does it would probably be an addon), the file will not be transferred at all.

  • Short Answer: The part of the file already transferred is lost/garbage collected/marked for deletion

  • The most likely scenario is that a partially transferred file will now exist on the server.

    Few servers would mark such a file for deletion - it would mean that you could never resume a broken transfer, but would have to start again from scratch.

0 comments:

Post a Comment