Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The planned-reparent-shard command
Run Vitess PlannedReparentShard on a Vitess database branch. It reparents a healthy shard to a new primary when both the current and new primaries are up and running.
Use this for planned maintenance when you want to choose the new primary.
Discover tablet aliases with pscale branch vtctl list-tablets before you reparent.
Usage:
pscale branch vtctld planned-reparent-shard also works.
You must be an Organization Administrator or a Database Administrator of the database. Service tokens need
write_branch_topology for development branches and write_production_branch_topology for production branches.Available sub-commands
* Flag is required
Sub-command flag descriptions
Available flags
Global flags
Examples
List tablets, then reparent a shard:--wait=false to get an operation id immediately, then poll with the PlanetScale status subcommand (this is not a Vitess vtctldclient command — it reads GET .../planned-reparent/:id):
API
POST /v1/organizations/:org/databases/:db/branches/:branch/planned-reparentGET /v1/organizations/:org/databases/:db/branches/:branch/planned-reparent/:id
keyspace, shard, new_primary. The create response is a vtctld operation; poll with the show endpoint or status until it completes.
There is no customer-facing EmergencyReparentShard command. PlanetScale handles emergency recovery automatically.

