How can I cleanly "pause" download & continue later?
Posted: 11.12.2017, 08:20
I'm on a very slow connection where I pay by the MB. I get better rates overnight and on the weekends, so I run wsusoffline (download-updates.bash) at those times, download what I can, then continue again the next night/weekend. I noticed in the log that an update did not continue where it left off the previous time, but instead started over again. I know this is expected with wsusscn2.cab and mpam..., but the update I'm referring to now is /client/w100-x64/glb/windows10.0-kb4048952-x64_e7918b1dff5622b1a03c1e599c6251d3b11f8f33.cab (904M). Here are excerpts from the log:
Between the 1st and 2nd attempts I believe I stopped it with Ctrl+C. When it tried again several days later it did not find the partially downloaded file and so restarted the download. Between the 2nd and 3rd attempts it did find the partial download and continued as expected. Since the cost of my downloads changes depending on the day of the week and time of day, I need to be able to "pause" the download arbitrarily to wait for a better time. Is there another option besides Ctrl+C? I guess I could just turn off my networking and the script would ultimately give up due to lack of a connection, but that isn't my preferred solution.
--2017-12-03 14:33:34-- http://download.windowsupdate.com/d/msd ... 1f8f33.cab
Connecting to download.windowsupdate.com (download.windowsupdate.com)|88.221.134.41|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 948001705 (904M) [application/vnd.ms-cab-compressed]
Saving to: '../client/w100-x64/glb/windows10.0-kb4048952-x64_e7918b1dff5622b1a03c1e599c6251d3b11f8f33.cab'
0K ........ ........ ........ ........ ........ ........ 0% 63.6K 4h1m
3072K ........ ........ ........ ........ ........ ........ 0% 73.7K 3h44m
[...]
64512K ........ ........ ........ ........ ........ ........ 7% 59.5K 4h31m
67584K ........ ........ ........ .......
--------------------------------------------------------------------------------
[### I believe I stopped this with Ctrl+C ###]
[...]
--2017-12-09 18:51:27-- http://download.windowsupdate.com/d/msd ... 1f8f33.cab
Connecting to download.windowsupdate.com (download.windowsupdate.com)|23.62.2.88|:80... connected.
HTTP request sent, awaiting response... 200 OK <================================================= I expected "206 Partial Content" here
Length: 948001705 (904M) [application/vnd.ms-cab-compressed]
Saving to: '../client/w100-x64/glb/windows10.0-kb4048952-x64_e7918b1dff5622b1a03c1e599c6251d3b11f8f33.cab'
0K ........ ........ ........ ........ ........ ........ 0% 89.2K 2h52m
3072K ........ ........ ........ ........ ........ ........ 0% 75.0K 3h8m
6144K ........ ........ ........ ........ ........ ........ 0% 77.7K 3h10m
[...]
294912K ........ ........ ........ ........ ........ ........ 32% 241K 5h21m
297984K ........ ........ ........ ........ ........ ........ 32% 9.98K 5h27m
301056K ........ . 32% 6.77K=2h39m
2017-12-09 21:31:48 (31.6 KB/s) - Read error at byte 308912317/948001705 (Success). Retrying.
--2017-12-09 21:31:49-- (try: 2) http://download.windowsupdate.com/d/msd ... 1f8f33.cab
Connecting to download.windowsupdate.com (download.windowsupdate.com)|23.62.2.88|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 948001705 (904M), 639089388 (609M) remaining [application/vnd.ms-cab-compressed]
Saving to: '../client/w100-x64/glb/windows10.0-kb4048952-x64_e7918b1dff5622b1a03c1e599c6251d3b11f8f33.cab'
[ skipping 301056K ]
301056K ,,,,,,,, ,....... ........ ........ ........ ........ 32% 194K 66m43s
304128K ........ ........ ........ ........ ........ ........ 33% 180K 61m22s
307200K ........ ........ ........ ........ ........ ........ 33% 115K 71m1s
[...]
Between the 1st and 2nd attempts I believe I stopped it with Ctrl+C. When it tried again several days later it did not find the partially downloaded file and so restarted the download. Between the 2nd and 3rd attempts it did find the partial download and continued as expected. Since the cost of my downloads changes depending on the day of the week and time of day, I need to be able to "pause" the download arbitrarily to wait for a better time. Is there another option besides Ctrl+C? I guess I could just turn off my networking and the script would ultimately give up due to lack of a connection, but that isn't my preferred solution.