# 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="/files/Ch8Nu0hpPRh1LeJuV4OM" 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boltai.com/docs/chat-ui/database-maintenance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
