Schema-Only Branch Becomes a Child Branch After Restore
Hi everyone, I encountered an issue while working with schema-only branches in Neon. Here’s what happened:
- I created a schema-only branch, which is supposed to be a root branch.
- I restored data into the schema-only branch from another branch (e.g., main).
- After the restore, the schema-only branch was renamed (e.g., to schema-only_old), and a new branch was created with the restored data.
- However, the new branch became a child branch of the branch I restored data from, instead of remaining a root branch.
- I was under the impression that schema-only branches and their restored versions should remain root branches. Is this the expected behavior, or am I missing something? How can I ensure the restored branch remains a root branch?
Thanks in advance for your help!
1 Reply
harsh-harlequin•3w ago
Hey!
Indeed this is the expected behavior. When you run restore on a branch, Neon creates a backup of that branch (pre-restore), and sets it as the parent so that you can easily roll back using
restore from parent. You can read more about it here :
https://neon.com/docs/introduction/branch-restoreNeon
Instant restore - Neon Docs
Restore data to any point in time Querying historical data Configure restore window With Neon's instant restore capability, also known as point in time restore or PITR, you can easily restore a branch...