Skip to content

Why --from option is ignored when creating a new branch with --restore option? #647

Answered by jgreet
ytnobody asked this question in Q&A
Discussion options

You must be logged in to vote

I think this is the correct behavior. In your example mybranch-1 is a restored backup of stage, which is a child branch of main, so mybranch-1 is also a child of main.

I see why it's confusing though. Perhaps pscale should throw an error when --from and --restore are used together.

An alternative might be to use the --seed-data flag to create a child of stage that contains the data from stage's most recent backup:

pscale branch create mydb mybranch-2 --from stage --seed-data

See https://planetscale.com/docs/concepts/data-branching

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ytnobody
Comment options

Answer selected by ytnobody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants