> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/configuration/bindplane/migration/bbolt-to-postgres-migration.md).

# Bbolt to Postgres Migration

Bindplane BBolt store has been deprecated since February 2025 and will be removed in January 2026. Follow these steps to migrate to Postgres as soon as possible.

### Objective

Export resources from a Bindplane project using a BBolt backing database and import them into the same project, but with a Postgres backing database.

### Prerequisites

The following requirements must be met:

* The newest patch of Bindplane **v1.98**, for example **v1.98.3**. If on an older version, upgrade before attempting a migration. Make certain to start Bindplane while still running Bbolt to ensure any neccessary system migrations run.

### Procedure

The migration procedure has the following steps:

1. Install and Configure Postgres
2. Stop the Bindplane service
3. Backup the bbolt database file
4. Configure Bindplane Postgres Store
5. Run the migration command
6. Start the service

#### 1. Install Postgres

Follow the [Postgres Installation Guide](/deployment/virtual-machine/bindplane/postgresql/postgres-installation.md) and the [Postgres Configuration](/deployment/virtual-machine/bindplane/postgresql/postgres-configuration.md) documentation for Postgres installation and configuration instructions.

#### 2. Stop the Bindplane service

The Postgres migration requires Bindplane to be stopped. Managed collectors will continue to operate their configuration.

```
sudo systemctl stop bindplane
```

#### 3. Backup the BBOLT Database file

To be safe, backup the bbolt database file. In this example, the database file is copied to the `root` user's home directory.

```
sudo cp /var/lib/bindplane/storage/bindplane.db ~/bindplane.db.bak
```

#### 4. Configure Bindplane Postgres Store

Edit `/etc/bindplane/config.yaml` with your text editor of choice. Update `store.type` to `postgres`. Add the `store.postgres` options with your Postgres host, port, database, username, and password. Leave all other `store` options in place.

```
store:
  type: postgres
  postgres:
    host: localhost
    port: "5432"
    database: bindplane
    username: bindplane
    password: your_password
```

#### 5. Migration Command

After updating the configuration file, run the `migrate-store` command. Root permissions are required in order to read the Bindplane server's configuration file. The migrate command will copy resources from the `bbolt` database file to the configured Postgres database.

```
sudo bindplane migrate-store --config /etc/bindplane/config.yaml
```

The migration is succesful if the output looks like this:

```
Performing migration from boltstore to postgres
Checking if database is empty... Done
Seeding eula versions... Done
Migrating eulas... Done
Migrating accounts... Done
Migrating users... Done
Migrating resource store... Done
Migrating library resources... Done
Migrating configs... Done
Migrating agent resources... Done
Migrating api keys... Done
Migrating agents... Done
Successfully performed database migration
```

#### 6. Start Bindplane

With Bindplane configured to use Postgres and the migration complete, you can start the service.

```
sudo systemctl start bindplane
sudo systemctl status bindplane
```

#### Validate

Log into the Bindplane project and ensure the configurations and destinations are present.

If you need to access the BBolt server, you can set `store.type` back to `bbolt` and restart the server to see the changes take effect.

Previously connected collectors will need to be updated with the new project's secret key. Follow the [Migrate Collectors documentation](/configuration/bindplane/migration/migrate-collectors.md).

### Troubleshooting

#### Logging

If you encounter issues, please review the log output for the service:

* `sudo journalctl -f --unit bindplane`
* `sudo tail -F /var/log/bindplane/bindplane.log`

#### Re-run Migration

If you need to re-run the `migrate-store` command, you can safely drop the database and start over.

1. Log into Postgres and run `DROP DATABASE bindplane;`
2. Follow the [Postgres Configuration](/deployment/virtual-machine/bindplane/postgresql/postgres-configuration.md) procedure again, to re-create the database and assign permissions
3. Re-run the migration command.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bindplane.com/configuration/bindplane/migration/bbolt-to-postgres-migration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
