# Cannot backup (connect to postgres) in docker\_dev

**URL:** <https://meta.discourse.org/t/cannot-backup-connect-to-postgres-in-docker-dev/79672>\
**Category:** Bug\
**Created:** [February 2, 2018, 9:13pm UTC](https://meta.discourse.org/t/cannot-backup-connect-to-postgres-in-docker-dev/79672 "2018-02-02T21:13:28Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 25, 2018, 11:48pm UTC](https://meta.discourse.org/t/cannot-backup-connect-to-postgres-in-docker-dev/79672/9 "2018-02-25T23:48:35Z")

</div>

> [@sam](#):
>
> Oh we probably want to update this, I think build.rb in the repo takes care of it these days.

OK. That’d be great. Per the above, I wanted to do something like this:

I wanted to add this to `Dockerfile`:

```plaintext
# Add libmysqlclient-dev for running imports
RUN apt-get update && apt-get install -y libmysqlclient-dev

```

And also, the database stuff in the OP. I don’t fully understand the security implications of the `trust` that I suggested, but I can’t get backups to work without the change. This is what I’m doing to run an import in `discourse_dev`

```plaintext
./bin/docker/shell_root
rm /etc/apt/sources.list.d/google-chrome.list
apt update
apt -y install libmysqlclient-dev
sed -i -e 's/peer/trust/g' /etc/postgresql/9.5/main/pg_hba.conf
exit
docker restart discourse_dev
./bin/docker/shell
time bundle exec ruby /src/script/import_scripts/vbulletin.rb # for example

```

---

_[View the full topic](https://meta.discourse.org/t/cannot-backup-connect-to-postgres-in-docker-dev/79672)._
