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, 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.

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

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. 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 and Activate buttons 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.