Appearance
PlanetScale
How to back up and restore PlanetScale managed databases with SimpleBackups.
PlanetScale is a MySQL-compatible managed database platform built on Vitess. Backing it up through SimpleBackups lets you store portable copies in your own storage with custom retention schedules, independent of PlanetScale's internal backups. This guide covers both the automatic OAuth-based setup and the manual connection string approach.
Automatic setup
In this section, you will connect your PlanetScale organization to SimpleBackups so that databases are discovered automatically via OAuth.
Step 1: Get the organization name
- Select the organization that contains the database you want to back up.
- From the menu, select Settings.
- Copy the Organization Name.


Step 2: Create a PlanetScale provider in SimpleBackups
- Go to the database backup page and click Add in the Connect your DBaaS Provider section.
- Select PlanetScale from the Provider dropdown, enter a name for your PlanetScale account, paste the organization name, then click Connect PlanetScale.
- You will be redirected to PlanetScale to log in and authorize access to your organization.
- Select the organization and click Authorize access.



Manual setup
Use this approach if you prefer to supply connection credentials directly.
Step 1: Open your PlanetScale database
Navigate to the Databases section in your PlanetScale dashboard.

Step 2: Configure IP filtering
- Select the database you want to back up.
- Go to Settings, then open the Passwords section.
- Add the SimpleBackups IP addresses to the allowlist.

Step 3: Copy your connection credentials
- In the Passwords section, choose the password you want to connect through.
- Copy the connection details (host, username).

Step 4: Set up a backup in SimpleBackups
Navigate to creating a new database backup and choose Serverless. You can connect using either manual form fill or automatic import:
Manual connection
Select the database Type and fill in the connection details, or click Paste connection string and enter the full connection URI.

Automatic import via DBaaS provider
- Click Connect your DBaaS Provider.
- Choose a PlanetScale provider.
- Select the managed database you want to back up.
- Click Validate.

Step 5: Validate and activate
Click Validate connection to confirm that SimpleBackups can reach your database. Once validated, configure your schedule and activate the backup.
Restoring a backup
To restore a backup, navigate to your backup page and open the Logs tab. Click the detail icon on the backup you want to restore from, then open the Restore tab. Generate a download link and copy it.



Run the following command to download and decompress your backup (replace the URL with your signed download link):
bash
wget -O - "<signed-download-url>" | gunzip -c > backup.sqlThen restore using mysql, replacing the placeholders with your credentials and database name:
bash
mysql -u username -p database_name < backup.sql