# Back up a site database

Back up only the database of a site to your own storage, now or on a schedule, and restore only the database when you need to.

## Before you start

- Backup storage connected to Nuvlo. See [Connect backup storage](https://app.nuvlo.dev/docs/connect-backup-storage).
- A site with a database: a WordPress site, a 1-Click app, or a PHP site whose database Nuvlo created. Applications and static sites only offer file backups.
- A role that can make changes. Viewers can't create or restore backups.

## Which databases are backed up

Database backups cover the databases that belong to your sites. Standalone databases you create under [Databases](https://app.nuvlo.dev/dashboard/databases) aren't included in backups yet. Export those yourself, for example with `pg_dump` or `mariadb-dump` through an SSH tunnel. See [Find database credentials](https://app.nuvlo.dev/docs/database-credentials).

## Step 1: Open Backups

Open [Backups](https://app.nuvlo.dev/dashboard/backups). To list only backups that contain a database, set the type filter to **Includes database**. This shows **Database** backups and **Full** backups, which contain the database and the files.

![The Backups list filtered to backups that include a database](https://app.nuvlo.dev/docs/shots/database-backups--list.webp)

## Step 2: Start a database backup

Click **Create backup**. In the dialog:

1. **Site**: the site whose database you want to back up.
2. **Backup type**: **Database only**.
3. **Storage provider**: where the backup is stored.
4. **Bucket**: the bucket to use. If Nuvlo can't list your buckets, type the **Bucket name** instead.

Click **Create backup**.

![The Create backup dialog with the Site, Backup type, Storage provider and Bucket fields](https://app.nuvlo.dev/docs/shots/database-backups--create.webp)

## Step 3: Wait for the backup to complete

The backup appears in the list as **Pending** or **Running** and the page updates by itself. When it shows **Completed**, the **Type** column reads **Database** and **Size** shows how large it is.

## Step 4: Back up the database on a schedule

Scroll to the **Schedules** card and click **Schedule backups** (or **Edit schedule**) next to the site. Set **Backup type** to **Database only**, then choose the frequency and how many backups to keep. Databases change more often than files, so a database-only schedule is a cheap way to back up more often. See [Schedule backups](https://app.nuvlo.dev/docs/backup-schedules) for every option.

![The schedule dialog for a site with the Backup type, frequency and retention fields](https://app.nuvlo.dev/docs/shots/database-backups--schedule.webp)

## Step 5: Restore only the database

Click **Restore** next to a completed **Database** or **Full** backup. Under **What to restore**, choose **Database only**. The site's files stay as they are.

Type the site's domain to confirm, then click the **Restore** button that names the site.

> **Warning:** Changes made since the backup, such as new orders or comments, are lost. The site stops briefly while its database is replaced.

![The Restore backup dialog with the What to restore choice and the confirmation field](https://app.nuvlo.dev/docs/shots/database-backups--restore.webp)

---
Source: https://app.nuvlo.dev/docs/database-backups
