pg_restore throwing errors

I've backed up my prod db and want to copy the data to a staging environment. I've copied the prod environment to staging, and followed this guide to get the backup via pg_dump https://blog.railway.app/p/postgre-backup but when I try to run pg_restore it gets stuck at the following error:
error: COPY failed for table "metadata": ERROR: duplicate key value violates unique constraint "metadata_pkey"
DETAIL: Key (key)=(exported_uuid) already exists.
CONTEXT: COPY metadata, line 1
error: COPY failed for table "metadata": ERROR: duplicate key value violates unique constraint "metadata_pkey"
DETAIL: Key (key)=(exported_uuid) already exists.
CONTEXT: COPY metadata, line 1
is this guide in the blog post still valid? when I try restoring to an empty database i get a bunch of timescaledb errors instead...
Railway Blog
How to Backup and Restore Your Postgres Database
In this post, we will go over the process of backing up and restoring your Postgres database hosted on Railway.
2 Replies
Percy
Percy8mo ago
Project ID: f5108384-ceed-4bfe-bebd-901ffd4f5423
Vinny (@Wasp)
Vinny (@Wasp)8mo ago
f5108384-ceed-4bfe-bebd-901ffd4f5423
Want results from more Discord servers?
Add your server