a year ago
I followed the steps outlined here to get a periodic DB dump.
https://blog.railway.app/p/automated-postgresql-backups
This is all working fine but when I tried to use the pg_restore
from my Mac, I got the following error.
pg_restore: error: unsupported version (1.15) in file header
I did a pg_restore --version
and I have thispg_restore (PostgreSQL) 15.7 (Homebrew)
I thought since they seem to be both 15
, it should work but as you can see it doesn't. What is the exactly pg_dump
version that was used in that Railway template
I used? How do you find this information out?
0 Replies
a year ago
it uses pg_dump 16
Ah ok. The actual Postgres DB
when I run SELECT version();
shows
PostgreSQL 15.5 (Ubuntu 15.5-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
So in this case
pg_dump 16
was used to dumpPostgreSQL 15
I need to use
pg_restore 16
to restore the dumpedPostgreSQL 15
Do I understand this correctly?
a year ago
correct
a year ago
no problem!