cURL Download and Upload Workflows/Retry transient failures

Retry transient connection and timeout errors.

Section: Downloads

Retry transient failures

bash
bash
curl --retry 5 --retry-delay 2 -O https://example.com/archive.tgz
Explanation

Useful for flaky networks and CI pipelines.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Downloads
Retry on all errors
Retry on all errors, including transient HTTP failures when appropriate.
OpenIn sheetbashsame section
Save using Content-Disposition filename
Use server-provided filename from headers.
OpenIn sheetbashsame section
Create local directories
Create local directories automatically for output paths.
OpenIn sheetbashsame section
Limit transfer rate
Cap the download or upload speed.
OpenIn sheetbashsame section
URL globbing with lists
Download several related URLs using brace expansion.
OpenIn sheetbashsame section
Download a numbered range
Download multiple similarly named files.
OpenIn sheetbashsame section