Skip to content
Browse docs

Locked databases

When you downgrade a plan, Layerbase never deletes a database to make you fit under the smaller limits. Instead, the databases that no longer fit are locked: frozen in place with their data kept, but offline. You get a "Locked" badge, an orange banner, and a set of recovery options. This page explains why a database locks and how to bring it back.

What "locked" means

A locked database is frozen, not deleted. The data is preserved indefinitely and is never removed because of a lock. What you cannot do is connect to it: a locked database will not start, wake, accept queries, or serve connections until you recover it.

A locked database does not count against your plan's database limit. Only your active (unlocked) databases count, so a lock never blocks you from running the databases you keep active.

Why a database locks

A downgrade locks a database for one of two reasons:

  • Over the limit. Your new plan allows fewer active databases than you currently run, so the extras are locked. You choose which ones stay active by activating them up to your new limit (see below).
  • Engine no longer included. Your new plan does not include that engine, so any database on it locks regardless of your count.

Upgrading back to a plan that fits unlocks the affected databases.

Recovering a locked database

Open the locked database to see its recovery panel. Depending on why it locked, you have up to four options.

Activate

If you are under your plan's active-database limit, click Activate to unlock the database. This is how you pick which databases stay active after an over-limit downgrade: activate the ones you want, up to your limit. Once activated, start or wake the database to connect. If you are already at your limit, the panel shows Upgrade to restore instead.

Download a backup

Download Backup exports the full database so you can keep your data even if you never bring it back online. This works while the database is locked. For performance engines (such as ClickHouse or QuestDB) the export briefly starts the engine and can take several minutes, so keep the tab open while it prepares.

Upgrade to restore

Upgrading to a plan that includes the engine and has room for the database unlocks it. Use the orange banner's Upgrade to restore all link, or the Upgrade to restore button on the locked panel, to open your plan page.

Convert (engine locks only)

When a database locked because its engine left your plan and a free, wire-compatible engine exists (for example MySQL to MariaDB), the panel offers a free Convert. Converting copies your schema and data into an engine your plan does include. This option does not appear for over-limit locks, since converting would not free up a slot.

Destroying a locked database

You can still permanently delete a locked database. Open its Settings tab and use Destroy database in the Danger Zone, confirming by typing the database name. As with any destroy, Layerbase secures a final backup first. If you do not need the data, download a backup before you destroy it.