# Database Maintenance

All your data is stored in a local SQLite database. To prevent data loss, it's highly recommended to back up your data regularly.

### How can I access this feature?

Go to **Settings > Advanced > Data Management**. Find the "Database Maintenance" section.

There are 3 operations you can do:

1. Take a full backup: take a back up of your SQLite database
2. Optimize Full-text Search index: optimize the FTS index for your chat data
3. Reclaim Disk Space: perform a `VACCUMN` operation.

<figure><img src="https://3493584844-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FynYW2xZqA52spY7XgWis%2Fuploads%2Fe4NKZbNzRPAYUtFpMHhQ%2FCleanShot%202024-06-10%20at%2023.55.33%402x.jpg?alt=media&#x26;token=f8872d3c-1244-45e6-b0a5-024da259b445" alt=""><figcaption></figcaption></figure>

### How to restore a backup?

Your database is stored in this location:

* For website version: `~/Library/Application Support/co.podzim.BoltGPT/db.sqlite`
* For Setapp version: `~/Library/Application Support/co.podzim.BoltGPT-setapp/db.sqlite`

To restore your backup:

1. Make sure you've taken a full backup of your database
2. Quit BoltAI
3. Copy and place the `backup.db` to the location above
4. Open BoltAI&#x20;

{% hint style="danger" %}
**WARNING**

* Unlike the data import & export feature, this operation will replace your data completely.
* Make sure you've taken a full backup before proceeding or it might result in data loss.
  {% endhint %}
