Error while trying to restore DB dump
Hi there,
I am trying to restore a DB backup but it always says the errors that are inside the attached printscreen.
How to fix this?
Solution:Jump to solution
you first need to extract the tar.gz to a folder.
then you can use that in the restore command like this:
...
39 Replies
Project ID:
b104e257-83ee-41ff-9531-6de29afa5df4
b104e257-83ee-41ff-9531-6de29afa5df4
i am on windows
need more info, how was the backup made?
using the pg backup template
this one if im correct
what is the filesize of your backup
😂 40 GB
yikes
yea there is something wrong and i have to digg what is wrong 😂
what command are you running to restore it
psql -d railway -U postgres < restore.sql
also tried pg_restore but its always complaining
about what
i am able to extract the tar.gz
one step further i guess
what is your pg_restore version?
14, already downloading 15
is the database on railway that the backup came from 15?
no, its on 13 😅
oh
tried to use pg restore from version 13 but i guess the pg_dump is using 15
well the template uses pg_dump 16, so you may need pg_restore 16 too
alright i see
idk pg_restore 15 might work with dumps from pg_dump 16
before this experience: only version 14, now 13,14,15 and possible 16
i`ll try
thanks so far 🙂
ah i see
okay with PG 16 it seems to work
the backup is underway?
yes
but 40GB takes sometime 😂
pog
first going to see locally whats actually worth that much diskspace...
fixed it
an infinit loop in automation stuff was causing the logs to grow by alot 😂
happy you fixed it!
what was the full command you use to restore the dump
starting from the tar.gz file
Solution
you first need to extract the tar.gz to a folder.
then you can use that in the restore command like this:
could you pipe the tar.gz file into pg_restore?
didnt work for me
only after extracting the tar.gz it worked
fair enough, thanks!
you too!