> backups & data
Moving data in and out: scheduled and manual backups per branch, restore-to-a-new-branch semantics that never overwrite in place, and full logical dump/restore for migrating into or out of PlanetScale. The restore model is the key mental shift — you don't roll a branch back, you materialize the backup as a fresh branch and cut over.
// backups & data
7 commands$ pscale backup create mydb main --name pre-users-migration$ pscale backup list mydb main$ pscale backup restore mydb recovery-branch <backup-id>$ pscale backup delete mydb main <backup-id>$ pscale database dump mydb main --output ./dump$ pscale database dump mydb main --tables users,orders --output ./dump$ pscale database restore-dump mydb import-branch --dir ./dump// faq
How do I restore a backup — does it overwrite my branch?
Never. `pscale backup restore` (or `branch create --restore`) materializes the backup into a NEW branch. You inspect it, then either point your app at it, promote it, or copy rows back. Production is never clobbered by a restore.
Does `pscale database dump` work for Postgres?
No — dump and restore-dump are Vitess-only. For Postgres branches use the standard toolchain: create a role, then run pg_dump / pg_restore against the branch's connection string. PlanetScale's docs cover the exact flags.
How often is my database backed up automatically?
Production branches get automatic daily backups (retention varies by plan); development branches get a daily backup retained briefly. Take a manual `pscale backup create` before anything scary — a big deploy request, a data migration — and note that restoring a backup into a branch runs that branch at production cluster size, which is billed.