# 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:** 4

<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:** [January 18, 2024, 6:45pm UTC](https://meta.discourse.org/t/error-when-migrating-to-an-external-postgres-instance/291992/4 "2024-01-18T18:45:29Z")

</div>

> [@Morpheus636](#):
>
> but it was using the default port (5432) rather than the one I configured (9432).

There is a remote chance that somehow the restore script does not respect the ENV variables (but everything else does?). The ways to check that are to look at the code and to try do do a restore from the UX. If you can restore from the UX then I think you could move this to #Contribute > Bug.

---

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