pg_dump version different from railway postgres version

dwaynemac
PRO

2 years ago

I'm on macOS trying to backup my database with:

railway service
railway shell
pg_dump $DATABASE_URL -f latest.dump

but I'm getting this error:

pg_dump: error: server version: 16.0 (Debian 16.0-1.pgdg120+1); pg_dump version: 14.8 (Homebrew)
pg_dump: error: aborting because of server version mismatch

1 Replies

dwaynemac
PRO

2 years ago

N/A


2 years ago

use a pg_dump version compatible with the database in use on railway


charlie
PRO

a year ago

I keep getting this error whenever I do a manual backup because it seems Railway keeps updating their PostgreSQL version which requires me to update mine on my local effecting all my other projects - it would be good to keep it static for a project


iodsghana
HOBBY

a year ago

Is there any progress on this? I am having a similar issue and I don't really know what version my postgres server is


a year ago

I'm pretty sure the version is printed in the deployment logs, but using pgdump / pgrestore version 16 is what you'd want to be using