I’ve had an issue with connecting to GIT in one of my repls, so the Replit engineering team helped me create a new repl and there I can manage my versions. However, I have a very nice postgre db in the original repl, which doesn’t exist in the new repl.
I’m trying to understand if I can migrate the db from the original repl to the new one.
help!
This is possible but requires several careful steps. Here’s what I’d recommend:
- Find the database connection details in your original repl’s Secrets tab
- Install PostgreSQL 17.2 on your local machine (on Mac:
brew install postgresql@17
)
- Use
pg_dump
to create a backup of your database locally (using the connection details from step 1)
- Create an empty database in your new repl
- Get the database connection information from your new repl’s Secrets tab
- Use the local
psql
command to restore the database to your new repl
3 Likes