# Update fails because of missing DB environment

**URL:** <https://hub.mender.io/t/update-fails-because-of-missing-db-environment/5461>\
**Category:** General Discussions\
**Created:** [November 25, 2022, 11:06am UTC](https://hub.mender.io/t/update-fails-because-of-missing-db-environment/5461 "2022-11-25T11:06:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pamolloy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/pamolloy/32/1789_2.png) [@pamolloy](https://hub.mender.io/u/pamolloy)\
**Post date:** [November 25, 2022, 11:06am UTC](https://hub.mender.io/t/update-fails-because-of-missing-db-environment/5461/1 "2022-11-25T11:06:19Z")

</div>

Just ran into the following trying to do a manual update with `mender install`. Even deleting the Mender data and restarting `mender-client` did not fix the issue.

```auto
ERRO[0000] Failed to open DB environment: mdb_env_open: no such file or directory 
ERRO[0000] failed to initialize DB store

```

It turns out that it is because the data is stored in `/data/mender`, which I pass to the daemon in the service file. I don’t see a way to configure this in `/etc/mender/mender.conf`. It would be really nice, rather than remembering to pass `--data` every time.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [November 28, 2022, 5:07am UTC](https://hub.mender.io/t/update-fails-because-of-missing-db-environment/5461/2 "2022-11-28T05:07:39Z")

</div>

Actually, it is stored in `/var/lib/mender`, but this usually points to `/data/mender` if you have used the Mender Yocto integration, mender-convert, or the Mender Raspberry Pi image. Are you sure this hasn’t gotten deleted somehow?
