Skip to content

How to migrate from the built-in postgres database to an external database without losing data. #7058

Answered by kylecarbs
matifali asked this question in Coder
Discussion options

You must be logged in to vote

The following steps should work:

  1. Stop your Coder deployment.
  2. Run coder server postgres-builtin-serve in a background terminal.
  3. Run coder server postgres-builtin-url and copy its output command.
  4. Run pg_dump <connection-string> to dump the database contents. Then restore that content to an external database, and start Coder pointing at the new one!

Let me know if something needs to be changed; happy to help!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@matifali
Comment options

matifali Apr 12, 2023
Maintainer Author

@matifali
Comment options

matifali May 21, 2023
Maintainer Author

@matifali
Comment options

matifali May 22, 2023
Maintainer Author

Answer selected by deansheather
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7057 on April 09, 2023 04:23.