# Import Database

**URL:** https://meta.discourse.org/t/import-database/258144
**Category:** Self-hosting
**Created:** [March 14, 2023, 7:22pm UTC](https://meta.discourse.org/t/import-database/258144 "2023-03-14T19:22:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Timelord](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Timelord](https://meta.discourse.org/u/Timelord)
#### Post date: [March 14, 2023, 7:22pm UTC](https://meta.discourse.org/t/import-database/258144/1 "2023-03-14T19:22:15Z")

</div>

Team, have taken a backup of my site, extracted the contents to my local disk, and drilled down until I have gotten the dump.sql file.

Should it be possible to import this is into a local install of PostgrSQL on my workstation? It is fighting me back all the way, so I thought I would check to see if there are any gotchas I should know about.

When I say fighting back, it hangs the workstation, throws no errors, so it is frustrating.

---

<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: [March 14, 2023, 10:31pm UTC](https://meta.discourse.org/t/import-database/258144/2 "2023-03-14T22:31:57Z")

</div>

> [@Timelord](#):
>
> Should it be possible to import this is into a local install of PostgrSQL on my workstation?

Yes. I usually do this by running discourse and restoring the whole thing, but you spoilt be able to restore the dump to postgres.

> [@Timelord](#):
>
> it hangs the workstation, throws no errors, so it is frustrating.

Is postgres or your os out of ram?

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [March 15, 2023, 12:17am UTC](https://meta.discourse.org/t/import-database/258144/3 "2023-03-15T00:17:47Z")

</div>

> [@Timelord](#):
>
> When I say fighting back, it hangs the workstation, throws no errors, so it is frustrating.

That does sound frustrating.

What exactly did you do, and at what point after that does it hang?

When you say “hang”, what does that mean? Does the command line process stop responding even to ctrl-c, but nothing else works? Or does everything become unresponsive? When that happens, does the mouse still move?

When whatever happens happens, is it all suddenly and at once, or does it get gradually worse (even if _quickly_ so)?

What is the hardware you are running this on? What else is going on on that system?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 15, 2023, 2:33am UTC](https://meta.discourse.org/t/import-database/258144/4 "2023-03-15T02:33:31Z")

</div>

> [@Timelord](#):
>
> Should it be possible to import this is into a local install of PostgrSQL on my workstation?

Yes, it’s a standard pg\_dump file, so it can be restored as a normal PostgreSQL backup via either `psql` or `pg_restore`.
