Guide
Database lifecycle
Layerbase databases sleep when idle and wake when you connect, so a quiet database costs nothing to keep around. This is what each state means, what brings a database back, and how to restore or permanently delete one. The short version: your data is safe at every step, and connecting is usually all it takes to resume.
The states
Up and serving queries. A database returns here after it is created, woken, restored, or started.
Auto-sleep after a period of inactivity (1 hour on Free, 6 hours on paid plans). Its address, routing, and storage stay in place, so the next connection transparently wakes it in a second or two for most engines - you usually never notice.
You explicitly stopped it. It will not wake on connect (that is the point of stopping). Start it again from the database's page when you need it.
Free-tier databases that have been idle for about two weeks are archived to free up shared capacity. The data and backups are kept, but the live address is removed, so connecting fails until you restore it. Paid plans never auto-archive.
Hibernation (auto-sleep)
Idle databases hibernate automatically. Hibernation is cheap and reversible: the database keeps its hostname, port, and volume, so the first new connection wakes it in roughly one to five seconds for most engines and the query then runs normally. You do not need to do anything - just connect.
One exception worth knowing: MySQL and MariaDB databases on a dedicated port do not wake on connect today - start them from the dashboard first. Postgres and most other engines wake transparently.
Always-on (skip hibernation)
Need a database to never sleep? Turn on Always on under the database's Settings tab. Always-on draws from your plan's pool, so it is available on paid plans (Free has no pool). Use it for anything latency-sensitive where even a one-second cold start is too much.
Stopping a database
Use Stop on the database's page to take it offline on purpose. Unlike hibernation, a stopped database will not wake on connect - you start it back up manually when you are ready. Stopping is a clean pause; nothing is deleted.
Archiving and restoring (Free tier)
A Free database that stays idle for about two weeks is archived. Archiving removes its live network address to reclaim shared capacity, so connecting returns an error that points you to restore it. Your data and backups are retained - this is not a deletion.
To bring it back, open the database and click Restore. Restoring rebuilds its address and starts it again, typically in ten to thirty seconds, and the database returns to running. Paid plans never auto-archive, so this only applies to Free.
Deleting a database (Destroy)
Permanent deletion lives under the database's Settings tab, in the Danger Zone, as Destroy database. Only the owner sees it. Because it cannot be undone, you confirm by typing the database name first.
Destroy permanently removes the database, its data, and its connection history, and any connected clients lose their connection immediately. Before anything is torn down, Layerbase secures a recoverable backup - the platform is built to never silently lose your data, so if that final backup cannot be captured, the delete is refused rather than risking the only copy.