pscale branch vtctl move-tables or the MoveTables API. The dashboard shows the live state of each workflow, read directly from Vitess.
There are two ways to use workflows:
Move tables between keyspaces
Move tables between keyspaces within your PlanetScale database. Used for sharding, resharding, and reorganizing data.
Import a database
Import data from an external MySQL database into PlanetScale with no downtime.
Move tables between keyspaces
Move tables from one keyspace to another within your PlanetScale database:- Unsharded to sharded: Move tables from an unsharded keyspace to a new sharded keyspace. This is the primary way to shard existing tables. See the Sharding quickstart.
- Sharded to sharded: Move tables between sharded keyspaces to change the number of shards. See Modifying the number of shards.
- Unsharded to unsharded: Move tables from one unsharded keyspace to another unsharded keyspace.
Import a database
To import an external internet-accessible MySQL database, you first connect it to your production branch as an external keyspace. Then you run a workflow with the external keyspace as the source and your PlanetScale keyspace as the target. The import copies your data, replicates new changes in real time, and switches traffic to PlanetScale with no downtime. For a full walkthrough, see the Database imports documentation.Workflow lifecycle
Every workflow follows the same lifecycle:- Create:
move-tables createcopies the table schemas to the target keyspace and starts copying rows. - Copy: Vitess copies the existing rows from the source to the target. Streams are
Copying. - Replicate: Once the copy finishes, Vitess keeps the target up to date with every new write on the source. Streams are
Running. - Verify: Optionally compare the source and target with a VDiff.
- Switch traffic:
move-tables switch-trafficmoves replica traffic, then primary traffic, to the target keyspace.move-tables reverse-trafficmoves it back. - Complete:
move-tables completestops replication. Its required flags decide whether the moved tables are dropped from the source keyspace and whether the routing rules are removed. You can alsocancela workflow at any point before it is complete.
move-tables status between steps. It shows each table’s copy progress, each stream’s state, and the traffic state. JSON output includes a next_steps field with the command to run next. See the move-tables reference for every command and flag.
View workflows in the dashboard
Select your database and click Workflows in the left nav. Pick a branch to see the MoveTables workflows on it, across all keyspaces or filtered to one keyspace. Open a workflow to see:- The source and target keyspaces, replication lag, and when the workflow last updated
- Which keyspace is serving reads and writes
- Each stream’s state, rows copied, and any error message
- Each table’s copy progress
- The results of the latest VDiff
pscale branch vtctl move-tables.
Earlier workflows
Workflows created withpscale workflow create, the earlier dashboard workflow pages, or the /workflows API endpoints are managed separately from MoveTables workflows. pscale workflow and the /workflows API endpoints are deprecated. Use pscale branch vtctl move-tables and the MoveTables API for new work.

