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

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

</div>

Can you get into a rails console and then show us the following values:

```rub
BackupRestore.database_configuration
BackupRestore::DatabaseRestorer.psql_command

```

e.g.:

```plaintext
→ rails c
Loading development environment (Rails 7.0.8)
[1] pry(main)> BackupRestore.database_configuration
=> #<struct BackupRestore::DatabaseConfiguration
 host=nil,
 port=nil,
 username="michael",
 password=nil,
 database="discourse_development">

[2] pry(main)> BackupRestore::DatabaseRestorer.psql_command
=> "psql --dbname='discourse_development' --single-transaction --variable=ON_ERROR_STOP=1 --username=michael"

```

---

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