I’m facing issues trying to backup my production database. This is the step I’m following:
1: Open a Command-line window where you launched your app (e.g., c:\moon). Type: fly proxy 15432:5433 -a moon-db
2: Open a new Command-line window of the same directory. Type: pg_dump -p 15432 -h localhost -U postgres -c -d moon -f db_backup
It will prompt you for password. I’m using the password from my DATABASE_URL env variable that have this format: postgres://moon:XXXXXXXXXXXX@top2.nearest.of.moon-db.internal:5432/moon
I’m using the password as XXXXXXXXXXXX (I’m hiding it)
And then receive this error message in the terminal:
pg_dump: error: connection to database "moon" failed: FATAL: password authentication failed for user "postgres"
Can you help me to see what is wrong in the process? And if the password isn’t in the DATABASE_URL, where can I find it?
I tried, now apper a new error related the version of pg_dump: pg_dump: error: server version: 14.4 (Debian 14.4-1.pgdg110+1); pg_dump version: 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) pg_dump: error: aborting because of server version mismatch