Bug 626 - sftp is unable to resume interrupted downloads/ uploads
Summary: sftp is unable to resume interrupted downloads/ uploads
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp (show other bugs)
Version: 3.6.1p2
Hardware: All All
: P2 enhancement
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords: low-hanging-fruit
Depends on:
Blocks: V_6_3
  Show dependency treegraph
 
Reported: 2003-08-12 14:12 AEST by Hussam
Modified: 2016-08-02 10:40 AEST (History)
2 users (show)

See Also:


Attachments
Implement truncation at "high water mark" on error (1.52 KB, patch)
2005-04-21 16:33 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hussam 2003-08-12 14:12:37 AEST
This is not a bug, but an enhancement. I would like to see the command-line sftp
have the ability to resume interrupted downloads/ uploads.

If there's a reason why sftp-resume will not be implemented, a FAQ entry would
be appreciated.
Comment 1 Damien Miller 2003-08-25 10:28:31 AEST
resume would be a nice feature for sftp and the protocol generally supports it.
It just takes someone to write the code and make a patch (I don't have time).

There may be some subtlety if the server reorders the blocks it has sent back to
the client when the original transfer was aborted. E.g. the client requests 5
contiguous blocks of 64k from the start of the file and the server sends back
blocks 1, 2, and 5. If the client wrote block 5 to disk, the the file would
appear to be the full length but wouldn't contain all the data.

We would need to modify the download and upload routines to ftruncate() at the
highest contiguous point transferred. This should probably be done anyway...
Comment 2 Damien Miller 2005-04-21 16:33:15 AEST
Created attachment 889 [details]
Implement truncation at "high water mark" on error

This patch does the clean truncation part. It is only useful for downloads.
Comment 3 Colin Watson 2013-09-15 08:22:41 AEST
Isn't this fixed in 6.3?

 * sftp(1): add support for resuming partial downloads using the "reget"
   command and on the sftp commandline or on the "get" commandline using
   the "-a" (append) option.
Comment 4 Damien Miller 2015-11-13 14:20:22 AEDT
Yes, resumption is implemented for both get and put now.
Comment 5 Damien Miller 2016-08-02 10:40:40 AEST
Close all resolved bugs after 7.3p1 release