Resume an interrupted crawl

Crawls are resumable. A scan is a retained SQLite artifact with provenance, so a stopped crawl continues from where it stopped instead of starting again.

What it does

Retained scans

A native scan is one SQLite file that keeps the evidence, the queue and the full settings together. You can inspect, export, snapshot, pin, prune, requeue, diff bodies and reanalyse it offline without contacting the site again. A finished scan is immutable.

  • scan-reanalyze reparses retained HTML
  • Snapshots and pins for baselines

Recovery

Run crawl-site --resume with the scan path and the crawl continues from the stored queue under the stored rules. On exit, crawl-site tells you whether the run finished, stopped early or continued an earlier one. crawl-diagnose reads the scan offline and explains what stopped it, with no network request.

Three steps, one saved scan

  1. The scan file is the checkpoint

    A SQLite scan keeps the queue, the evidence and the full settings in one file. They are written in the same transaction, so a stop does not split them.

  2. Resume from the file alone

    Run spiderhead crawl-site --resume with the scan path. The start URL and settings are read from the file, so the crawl continues under the same rules.

  3. Diagnose what stopped it

    crawl-diagnose reads the scan offline. It shows the queue, robots, scope and budget state, the content types and the recorded failures, with no network request.

Checks in this feature

CheckWhat it meansSeverityEvidence
NO_RESPONSEThe URL timed out, failed DNS or refused the connection. A stopped origin often shows up here.CriticalURL and failure type in the scan
SERVER_ERROR_5XXThe page returns a 5xx status, for example when the origin stops responding under load.CriticalURL and status code
BROKEN_PAGE_4XXThe page returns a 4xx status, so it is broken for users and crawlers.CriticalURL and status code
BLOCKED_BY_ROBOTSrobots.txt blocks the URL. Confirm the block is intended before resuming.ImportantURL and the robots.txt rule

One command

bash
spiderhead crawl-diagnose --scan ./scans/audit.sqlite

Install first: installation guide. Every command also runs as an MCP tool for AI agents.

What you need

  • The scan file written by crawl-site --scan-out
  • The same SpiderHead build that wrote it (or --producer-build SHA)
  • For a legacy folder run: the identical command and the same --out-dir

Limits

  • A finished or failed scan cannot be resumed
  • A crawl that stopped at its own URL or time budget resumes under that same budget; raise it and crawl to a new scan
  • Crawls that used credential headers cannot be resumed
  • Only rate settings can be changed on resume

Questions

Can I change the URL or settings when I resume?
No. Only the rate options (--max-urls-per-second, --min-delay) are accepted with --resume. The start URL and every other setting are read from the file, so one crawl never continues under another crawl's rules.
Does a resume need the same SpiderHead build?
Yes. A resume from a different source revision is refused, and the message names both revisions. If this checkout cannot be verified as the build that wrote the file, pass --producer-build with its SHA.
Will a resumed crawl fetch pages again?
No. A page already committed to the scan is not fetched twice. The resumed run continues from the stored queue.
Will a stopped crawl look complete?
No. The JSON output and the stored audit record partial, finish_reason and resumed, so a partial scan never reads as a whole site.
How do I resume a crawl that used --out-dir?
Run the identical command again with the same --out-dir. The crawl_state.json checkpoint in that folder decides the resume. If the scope or limits changed, the crawl starts over on purpose.

Try it on your own site