Prevent accidental production deletion or reset
Production database branch
Neon · Const
Neon protected branches safeguard production or sensitive data by blocking destructive branch, compute, and project operations. They can also trigger fresh child-branch credentials and optionally restrict access through IP Allow.
A protected branch is a Neon branch designated for production or other sensitive data. Neon prevents destructive branch, compute, and project operations, generates fresh Postgres role passwords for child branches, and can optionally limit network access to protected branches with IP Allow.
neonctl branches create --project-id <project-id> --name <branch-name> --protectedneonctl branches create --project-id "$NEON_PROJECT_ID" --name production --protectedCreates a protected production branch with the Neon CLI; authenticate and configure neonctl before running it.
Production database branch
Sensitive-data branch
Developer or preview branches
Restricted production network
A protected branch cannot be deleted or reset, and its project cannot be deleted. The compute attached to it also cannot be deleted, and inactivity does not archive the branch.
Follow-up: How can access be limited to these branches? Configure Neon IP Allow and apply the allowlist only to protected branches.
When a branch is created from a protected branch, Neon automatically generates new passwords for Postgres roles on the child branch. This prevents credentials from the protected branch from carrying over.
Follow-up: Does protection itself restrict network access? No; IP Allow requires separate configuration.
Protected branches are available on Neon paid plans. The guide lists up to two protected branches for Launch and up to five for Scale.
Follow-up: What should determine which branch is protected? Normally select branches containing production or sensitive data.
IP Allowbranch archivingPostgres rolesreset a branch from parentNeon paid plans