Skip to content
TurboDL

CLI

Pause and resume

Ctrl+C saves the state; resuming continues where the download stopped, when the source allows it.

Pausing

During a download, Ctrl+C:

  1. stops the threads cleanly;
  2. writes the state file <file>.part.turbodl next to the partial file;
  3. prints the resume command and exits with code 130.

A second Ctrl+C quits immediately.

Resuming

turbodl-cli resume "Downloads/Video/movie.mkv.part.turbodl"

Running the original command again works too: TurboDL finds the existing state.

When is resuming possible?

Partial resume needs two conditions:

  • the server accepts byte ranges (206 Partial Content answer);
  • the remote file has not changed: the ETag and Last-Modified are compared with the saved ones.

If the file changed, TurboDL says so and starts over from the beginning, so two versions are never mixed. If the server does not support byte ranges, it warns you from the start: "This source cannot be resumed".

What about secrets?

The state file contains no secret:

  • ${VAR} values are kept as is and expanded again when resuming;
  • sensitive literal values (Authorization, Cookie, Proxy-Authorization, password) are never written: pass them again when resuming with -H, -b or -u.