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. Nothing freezes the moment you downgrade, either: you get an email and a 72-hour window first. This page explains the warning, 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. A plan-limit pause also never touches your whole account: we pause only as many databases as it takes to bring you back to your limit, so your most-active databases keep running.

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. We pick them for you, least recently used first, and stop as soon as your count fits the plan. The 72-hour warning email names the exact databases before any of it happens.
  • 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.

The 72-hour warning

A lock is never the first you hear about it. The first time our entitlement check finds an account over its plan, it does not lock anything: it opens a 72-hour grace window and emails you, listing every database at risk and the exact deadline. Your databases keep running for the whole window.

You get a second email about a day before the deadline if the account is still over its limits. Two things close the window early and cancel the lock, with nothing else to do: upgrading to a plan that fits, or removing the extra databases yourself. Databases are locked only if the window runs out with the account still over its entitlement, and even then nothing is deleted: the recovery options below stay available indefinitely.

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

Activate unlocks a database, but only when your plan has a free slot. Right after an over-limit pause you are sitting exactly at your limit, so there is no free slot yet and the button is unavailable. Free one first: delete an active database you no longer need, or upgrade to a plan with more room. Then activate the locked database you want back, and start or wake it to connect. While every slot is in use, the panel offers Upgrade to restore and a backup download 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. The orange banner names the plan that fits every database on your account (for example Upgrade to Pro to restore all 2), so you do not have to work out which tier is big enough. Its second link opens your locked databases with their Download backup action (and Activate, once a slot is free) in front of you. The locked panel on the database itself carries the same Upgrade to restore button.

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.