# How to restore from pgdump on local development docker install?

**URL:** https://meta.discourse.org/t/how-to-restore-from-pgdump-on-local-development-docker-install/215083
**Category:** Development
**Created:** [January 17, 2022, 12:26pm UTC](https://meta.discourse.org/t/how-to-restore-from-pgdump-on-local-development-docker-install/215083 "2022-01-17T12:26:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [January 17, 2022, 12:26pm UTC](https://meta.discourse.org/t/how-to-restore-from-pgdump-on-local-development-docker-install/215083/1 "2022-01-17T12:26:45Z")

</div>

I was previously using the macOS environment, but I got tired of rails code breaking after Discourse updates, so I’m trying the docker setup.

Everything worked up to the point where I see the wizard welcome screen, but I’m trying to restore my old development database content with this command:

```plaintext
psql -d discourse_development -f my_old_pg_dump.sql

```

Which isn’t making a difference because it’s not targeting the DB in the docker container. I’ve also tried using `d/psql` but then it can’t access the sql file.

I feel like there’s something obvious I’m missing.

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [January 18, 2022, 8:17am UTC](https://meta.discourse.org/t/how-to-restore-from-pgdump-on-local-development-docker-install/215083/2 "2022-01-18T08:17:32Z")

</div>

I figured out that the docker image [maps the current folder](https://github.com/discourse/discourse/blob/main/bin/docker/boot_dev#L100), so I moved the sql file there and was able to access it:

```plaintext
d/shell_root
su postgres -c "psql -d discourse_development -f my_old_pg_dump.sql"

```
