> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streambuild.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# stb backfill

> Create and populate a virtual-environment deployment.

`backfill` requires `[settings] virtual_environments = true`.

```bash theme={null}
stb backfill
stb backfill --deployment-id release_2026_07
stb backfill --select orders --full-refresh
stb backfill --select orders --start-time 2026-07-01T00:00:00Z
stb backfill --auto-approve
stb backfill -v
```

The command plans, creates deployment-specific tables and materialized views, attaches live paths,
captures inclusive watermarks, and replays history. Stable `tbl__*` views remain unchanged until
publish.

`--full-refresh` and `--start-time` are mutually exclusive, require at least one selector, and apply
to selected models plus downstream closure. Start-time replay also requires active published roots.

Before writing, StreamBuild displays the plan and prompts for confirmation. `--auto-approve` skips
the prompt; `--json` execution requires auto approval. `--verbose` and `-v` show complete schema
diffs.

After backfill, assess and publish the same deployment:

```bash theme={null}
DEPLOYMENT_ID="replace-with-id-from-backfill"
stb audit backfill --deployment-id "$DEPLOYMENT_ID"
stb publish --deployment-id "$DEPLOYMENT_ID"
```

See [`stb audit backfill`](/cli/audit) and [`stb publish`](/cli/publish) for candidate selection and
readiness behavior.
