I’m trying to migrate from a Postgres cluster (on Fly) to SQLite with LiteFS and having a bit of trouble with the data migration. I’m a db noob, so I tried writing a simple script that would run on startup to query/upsert all data from Postgres to SQLite, but that’s not working out at the moment due to probably too much data to handle I think (the script stops without explanation when trying to copy 425k records).
So now I’m investigating the “proper” way to do this following these instructions: Convert PostgreSQL to SQLite - Manuel van Rijn
Trouble is when I try to run:
fly ssh console -a kcd-postgres -C "pg_dump --data-only --inserts withered_frost_3196" > ~/Desktop/dump.sql
I’m able to connect just fine, but I get the error:
pg_dump: error: connection to database "withered_frost_3196" failed: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I’m stuck. Any idea of how to do this properly? I only need this to run once so hacks are acceptable
I should add that the server is definitely running as my app still works