highandover
highandover
RRailway
Created by highandover on 5/15/2024 in #✋|help
Unable to restore postgres database from back-up file
I'm following the steps here: https://blog.railway.app/p/postgre-backup It seems to create the back-up file OK. But when attempting to restore I get a huge stream of what looks like the same error over and over (for each table in the schema). Here's an example of one such error:
pg_restore: error: could not execute query: ERROR: type "PAYMENT_COLLECTION_STATUS_ENUM" already exists
Command was: CREATE TYPE public."PAYMENT_COLLECTION_STATUS_ENUM" AS ENUM (
'not_paid',
'awaiting',
'authorized',
'partially_authorized',
'canceled'
);
pg_restore: error: could not execute query: ERROR: type "PAYMENT_COLLECTION_STATUS_ENUM" already exists
Command was: CREATE TYPE public."PAYMENT_COLLECTION_STATUS_ENUM" AS ENUM (
'not_paid',
'awaiting',
'authorized',
'partially_authorized',
'canceled'
);
I'm using the restore command as outlined in Railway's blog post:
pg_restore -U <username> -h <host> -p <port> -W -F t -d <db_name> <dump_file_name>
pg_restore -U <username> -h <host> -p <port> -W -F t -d <db_name> <dump_file_name>
Anyone else experienced this issue and know how I can solve it? Thanks.
20 replies
RRailway
Created by highandover on 3/19/2024 in #✋|help
Taking back-up of postgres database
Hey — I'm trying to back-up a postgres db from my Railway project to my Mac. I found this guide: https://blog.railway.app/p/postgre-backup Problem is I get this error:
pg_dump: error: server version: 16.0 (Debian 16.0-1.pgdg120+1); pg_dump version: 14.11 (Homebrew)
pg_dump: error: aborting because of server version mismatch
pg_dump: error: server version: 16.0 (Debian 16.0-1.pgdg120+1); pg_dump version: 14.11 (Homebrew)
pg_dump: error: aborting because of server version mismatch
I can't seem to update postgresql beyond version 14.11 on my Mac. Anyone found a solution to this without having to use something like the S3 or Gdrive back-ups?
8 replies