# Unknown Primary Key

**URL:** <https://meta.discourse.org/t/unknown-primary-key/260985>\
**Category:** Self-hosting\
**Created:** [April 7, 2023, 9:02pm UTC](https://meta.discourse.org/t/unknown-primary-key/260985 "2023-04-07T21:02:37Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![MikeNolan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikenolan/32/297597_2.png) [@MikeNolan](https://meta.discourse.org/u/MikeNolan)\
**Post date:** [April 9, 2023, 6:21am UTC](https://meta.discourse.org/t/unknown-primary-key/260985/5 "2023-04-09T06:21:44Z")

</div>

I don’t think the database files are inside the container, so postgresql is likely to be missing the discourse database if not the entire set of database files.

A restore should fix it, as standard postgresql restore should create the discourse database. (But if that fails, try creating the database then do a restore.)

---

_[View the full topic](https://meta.discourse.org/t/unknown-primary-key/260985)._
