Hi, newbie question:
I wanted to dump the db (pg_dump
), only to get this error:
pg_dump: error: 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?
here’s what i did to get that:
fly ssh console --app myapp-db --config ./myapp-staging.toml
- created postgres container (i only access postgres with containers)
- ran bash inside running container
- ran these 2 commands:
pg_dump -U postgres -d myapp_staging > /path/to/filename.sql
ANDpg_dump -d postgres://postgres:password@localhost:5432/databasename > /path/to/filename.sql