Does the latest curl library fully support resume of interrupted uploads to SMB 
shares?

By fully I mean avoiding copying the first part or seeking to EOF over the SMB 
connection.

If so should it also work for upload to SMB share as well as download?

To test it using curl 7.65.3 on MacOS Mohave I tried an interrupted download of 
~ 2gb file from a windows share, which took approx. 35 seconds.

Then I deleted the file, started download again, interrupted with ctrl-c 
halfway through, and ran same command again, note it says it is resuming at 
byte xxxx.

The result was a file equal in size to the first part that made it when I 
interrupted plus the size of the whole file.  It seems to have copied the whole 
file on the second try and appended to the first.  In addition the total time 
of the second part copy is the same as copying the whole file and the progress 
shows same, even though the second one says it’s resuming at byte xxxx.

Seems like it’s trying to do the right thing but wondering if I should report 
as an issue, or maybe it has something to do with the version of SMB used on 
MacOS?

Alf (see test run below)

FIRST COPY OF WHOLE FILE – note size of file after copy (correct)

$ curl -O -C - -u username:password 
smb://172.16.166.133/repl/ubuntu-18.04.2-desktop-amd64.iso
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1904M  100 1904M    0     0  52.3M      0  0:00:36  0:00:36 --:--:-- 53.4M

$ ls -al | grep ubuntu
-rw-r--r--    1 alfred_eisenberg  staff  1996488704 Jul 29 15:26 
ubuntu-18.04.2-desktop-amd64.iso

$ rm ubuntu-18.04.2-desktop-amd64.iso

SECOND TIME – interrupted after 20 seconds and continued

$ curl -O -C - -u username:password 
smb://172.16.166.133/repl/ubuntu-18.04.2-desktop-amd64.iso
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 57 1904M   57 1091M    0     0  52.2M      0  0:00:36  0:00:20  0:00:16 54.6M^C

$ ls -al | grep ubuntu
-rw-r--r--    1 alfred_eisenberg  staff  1165524992 Jul 29 15:28 
ubuntu-18.04.2-desktop-amd64.iso

alfred_eisenberg@alfmbpr2:~/curlsmb$ curl -O -C - -u alfred_eisenberg:bordel 
smb://172.16.166.133/repl/ubuntu-18.04.2-desktop-amd64.iso
$ curl -O -C - -u alfred_eisenberg:bordel 
smb://172.16.166.133/repl/ubuntu-18.04.2-desktop-amd64.iso
** Resuming transfer from byte position 1165524992
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1904M  100 1904M    0     0  52.7M      0  0:00:36  0:00:36 --:--:-- 54.2M
$ls -al | grep ubuntu
-rw-r--r--    1 alfred_eisenberg  staff  3162013696 Jul 29 15:29 
ubuntu-18.04.2-desktop-amd64.iso



--
Alfred Eisenberg
[cid:image001.png@01D38A20.71838E70]
https://www.quest.com/




-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
  • resume of interrupted transfe... Alfred Eisenberg (aeisenbe) via curl-library

Reply via email to