Kartik
02/17/2026, 2:55 PMMarvin
02/17/2026, 2:55 PMMarvin
02/17/2026, 3:00 PMprefect server database reset -y drops all tables, which removes both configured blocks and the registered block types. Here’s how to get the default block types back.
Quickest option (auto-register on startup)
- If you restart the Prefect server, it will auto-register the core block types during startup.
prefect server start
Manual re-registration (no server restart needed)
- Register Prefect’s built-in blocks (Secret, Webhook, notifications, etc.):
prefect block register -m prefect.blocks
- Register the core filesystem blocks (e.g., LocalFileSystem):
prefect block register -m prefect.filesystems
- Verify they’re present:
prefect block type ls
If you use integrations (AWS/GCP/etc.)
- Re-register blocks from each collection you use. Example for AWS (ensures extras are available at runtime):
uv run --with 'prefect[aws]' prefect block register -m prefect_aws.credentials
Important note about configured blocks
- A DB reset permanently deletes your configured block instances (e.g., saved Secrets, FileSystems). Those can’t be recovered without a backup — you’ll need to recreate them in the UI or via code.
References
- Blocks (Prefect docs)
If you’re still not seeing the blocks after running the above, let me know which ones are missing and I’ll help you target the right module(s) to register.Kartik
02/17/2026, 3:03 PMMarvin
02/17/2026, 3:03 PMMarvin
02/17/2026, 3:05 PMprefect config view
- Ensure api.url points to your server (e.g., http://127.0.0.1:4200/api). If it points elsewhere, the commands below will affect the wrong backend.
Step 1: Re-register the Secret block type
- Either register just system blocks:
prefect block register -m prefect.blocks.system
- Or register all built-in blocks (system + notifications):
prefect block register -m prefect.blocks
- Verify:
prefect block type ls
Step 2: Recreate your Secret block instance
- Easiest is via Python:
from prefect.blocks.system import Secret
Secret(value="YOUR_TOKEN_VALUE").save("dbt-git-repo-token", overwrite=True)
# Later, to use it:
# token = Secret.load("dbt-git-repo-token").get()
Alternative via UI
- Run:
prefect block create
- Follow the link to the UI, choose “Secret”, name it dbt-git-repo-token, and enter the value.
Notes
- A DB reset permanently deletes configured blocks; there’s no recovery without a backup.
- The correct identifier for the block you’re creating/using is secret/dbt-git-repo-token.
Docs
- Blocks (how to create/use blocks)
- CLI: prefect block