dbuxton101
IS-IT--Management
Hey I am looking to find a way to export data from a database and import to the same structured database but on a different server.
I have managed to export the data by going
psql -U Administrator -d cc -c "COPY cntcfg TO 'C:\cntcfg.txt' DELIMITER ',' CSV;"
but when I try the import
psql -U Administrator -d cc -c "COPY cntcfg FROM 'C:\cntcfg.txt' DELIMITER ',' CSV;"
I receive an error
ERROR: duplicate key value violates unique constraint "cntcfg_stattype_cntid_tasktype_idx"
DETAIL: Key (stattype, cntid, tasktype)=(7, 8000, 1) already exists.
CONTEXT: COPY cntcfg, line 1
Please help.
I have managed to export the data by going
psql -U Administrator -d cc -c "COPY cntcfg TO 'C:\cntcfg.txt' DELIMITER ',' CSV;"
but when I try the import
psql -U Administrator -d cc -c "COPY cntcfg FROM 'C:\cntcfg.txt' DELIMITER ',' CSV;"
I receive an error
ERROR: duplicate key value violates unique constraint "cntcfg_stattype_cntid_tasktype_idx"
DETAIL: Key (stattype, cntid, tasktype)=(7, 8000, 1) already exists.
CONTEXT: COPY cntcfg, line 1
Please help.