# Error when migrating to an external postgres instance

**URL:** <https://meta.discourse.org/t/error-when-migrating-to-an-external-postgres-instance/291992>\
**Category:** Self-hosting\
**Created:** [January 17, 2024, 8:19pm UTC](https://meta.discourse.org/t/error-when-migrating-to-an-external-postgres-instance/291992 "2024-01-17T20:19:24Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [January 18, 2024, 7:18pm UTC](https://meta.discourse.org/t/error-when-migrating-to-an-external-postgres-instance/291992/11 "2024-01-18T19:18:09Z")

</div>

Ah! You’ll also need to set

```plaintext
DISCOURSE_DB_BACKUP_PORT: 9432

```

and then things should work.

EDIT: this default has been in place for a while but seems to have caused more difficulty than good.

[FIX: clear db\_backup\_port default value by Supermathie · Pull Request #25316 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/25316) also should resolve this and avoid this confusion for future travellers

---

_[View the full topic](https://meta.discourse.org/t/error-when-migrating-to-an-external-postgres-instance/291992)._
