pg_restore fails due to missing constraint #8479
-
Hi Netbox community I'm trying to restore a dump to a fresh install of netbox but the restore fails with the following message:
I'm using netbox v3.0.2, installed on a Kubernetes cluster with the netbox helm chart. Has anybody else stumbled across this error? Or does anyone have an idea how to go forward from here? Help is very much appreciated. Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I solved the issue: I had to change the restore command to That way |
Beta Was this translation helpful? Give feedback.
-
I had this same error message, but in my case it was because the database I was trying to restore into had run out of disk space. |
Beta Was this translation helpful? Give feedback.
I solved the issue: I had to change the restore command to
pg_restore --create --clean --exit-on-error --verbose -U postgres -h localhost -d postgres DUMPFILE
That way
pg_restore
connects to thepostgres
db, from there drops and creates thenetbox
db (as instructed by dump), connects to it and restores the whole dump.