# Bolt Store

When Bindplane is configured to use Bolt Store as the storage backend, a [bbolt](https://github.com/etcd-io/bbolt) database on the filesystem is created. Bbolt is deprecated in favor of PostgreSQL. This documentation can be used when backing up your Bbolt based Bindplane installation.

### Backup

The Bolt Store database file is constantly written to. In order to guarantee consistency and avoid corruption of the backup file, Bindplane must be stopped before the database file can be copied.

```bash
sudo systemctl stop bindplane

sudo cp \
    /var/lib/bindplane/storage/bindplane.db \
    /var/lib/bindplane/storage/bindplane-$(date '+%Y-%m-%d_%H:%M:%S').db

sudo systemctl start bindplane
```

After copying the database file, the storage directory will look something like this:

```
/var/lib/bindplane/storage
├── bindplane-2023-08-03_15:04:31.db
└── bindplane.db
```

It is recommended that the copied database files be moved to a remote system, such as a backup server or a secure object storage service like Google Cloud Storage or Amazon S3.

### Restore

To restore a backup of Bolt Store, use the following process:

1. Stop the server: `sudo systemctl stop bindplane`
2. Backup the current database file
3. Copy a previous database backup file to `/var/lib/bindplane/storage/bindplane.db`
4. Start Bindplane: `sudo systemctl start bindplane`


---

# 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.bindplane.com/configuration/bindplane/backup-and-disaster-recovery/bolt-store.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.
