> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dbhost.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Backups, retention and deletion

> What DBHost backs up per environment, how long logical backups and snapshots are kept, and how deleted databases are recovered or purged.

This page is the single reference for what DBHost keeps and for how long.

## Logical backups by environment

DBHost takes logical backups with `pg_dump` and stores them off-host in AWS S3
(`eu-north-1`) as `.sql.gz` files.

| Environment | Daily scheduled backup |
| - | - |
| **production** | Always daily |
| **staging** | Daily by default; can choose none |
| **development**, **other** | Choose none or daily when creating the database |
| **Preview** | None by default; can choose daily |

Scheduled backups run once a day at no fixed time. A `none` choice only turns
off scheduled backups: owners and admins can still take an on-demand backup
from the dashboard on every plan, or through the API and CLI on Pro and
Business.

## How long things are kept

| What | Retention | Can you restore it? |
| - | - | - |
| Logical backups (scheduled and on-demand) | 30 days | Yes, see [Restore from a DBHost backup](/guides/restore-from-backup) |
| Host snapshots | The three newest | No. Infrastructure disaster recovery only |
| Deleted database and its deletion backup | 7 days | Yes, recover it or download the deletion backup |

Host snapshots are disk-level copies of the database server. They can contain
data from any database on the host, including previews without daily backup,
and they rotate by count rather than by age.

## Deleting a database

When an owner deletes a database, DBHost first creates and verifies a deletion
backup, then disconnects the database. For the next **7 days** the owner can:

* recover the database from **Recently deleted** in the dashboard or with
  [`POST /api/v1/databases/{id}/recover`](/api-reference/databases/deleted),
  if the plan has a free database slot
* download the deletion backup, regardless of quota

After 7 days, DBHost deletes the database and its deletion backup
permanently and automatically. This cannot be undone.

## What DBHost does not offer

* Point-in-time recovery (PITR)
* Restoring an uploaded SQL file or dump through DBHost; see
  [Restore your own dump](/guides/restore-your-own-dump)
* Restoring from host snapshots on request

See [Limits](/limits) for the full list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.