Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

The backup command

This command allows you to create, list, show, update, restore, and delete branch backups for Vitess, Neki, and Postgres databases, and manage scheduled backup policies. Usage:

Available sub-commands

* Flag is required

Sub-command flag descriptions

Available flags

Global flags

Examples

The list sub-command with --org flag

Command:
Output:

The show sub-command

Command:
You can find the <BACKUP_ID> by running the pscale backup list <DATABASE_NAME> <BRANCH_NAME> command. Output:

Manage backup policies

Backup policies define automatic backup frequency, schedule, and retention for production or development branches. This is separate from one-off backups created with pscale backup create.

Restore a backup to a new branch

<NEW_BRANCH_NAME> is the branch to create. It must not already exist. Identify the backup by ID; the source branch is not a restore argument.
For Neki, omitted configuration-profile and router sizes inherit the live source branch. Preview those defaults first:
Override individual Neki configuration profiles or routers. name is required; size and replica count are optional per entry.
--config-profile and --router are Neki-only. Sidecar, admin, and parameter settings are not restored. You can also restore with pscale branch create --restore.

Protect a backup from deletion

--protected is required. Use --protected=false to turn protection off.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.