Hello everyone,
I’m getting some error when I run the restore command…
SET
SET
SET
SET
SET
set_config
------------
(1 row)
SET
SET
SET
SET
CREATE EXTENSION
COMMENT
ALTER TYPE
ERROR: type "enum_Notes_permission" already exists
SET
SET
ERROR: relation "Authors" already exists
ALTER TABLE
ERROR: relation "Authors_id_seq" already exists
ALTER TABLE
ALTER SEQUENCE
ERROR: relation "Notes" already exists
ALTER TABLE
ERROR: relation "Revisions" already exists
ALTER TABLE
ERROR: relation "SequelizeMeta" already exists
ALTER TABLE
ERROR: relation "Sessions" already exists
ALTER TABLE
ERROR: relation "Temp" already exists
ALTER TABLE
ERROR: relation "Temps" already exists
ALTER TABLE
ERROR: relation "Users" already exists
ALTER TABLE
ALTER TABLE
ERROR: duplicate key value violates unique constraint "Authors_pkey"
DETAIL: Key (id)=(1) already exists.
CONTEXT: COPY Authors, line 1
setval
--------
2
(1 row)
ERROR: duplicate key value violates unique constraint "Notes_pkey"
DETAIL: Key (id)=(139cc586-bbe4-4e08-87b5-c77dab9c2d67) already exists.
CONTEXT: COPY Notes, line 1
ERROR: duplicate key value violates unique constraint "Revisions_pkey"
DETAIL: Key (id)=(d3a30eb1-24b1-4bd2-a08d-0b79a17b0d7e) already exists.
CONTEXT: COPY Revisions, line 1
ERROR: duplicate key value violates unique constraint "SequelizeMeta_pkey"
DETAIL: Key (name)=(20150504155329-create-users.js) already exists.
CONTEXT: COPY SequelizeMeta, line 1
ERROR: duplicate key value violates unique constraint "Sessions_pkey"
DETAIL: Key (sid)=(YU3T4MbAOIL0zoKwI1SWUphyroxHm0PS) already exists.
CONTEXT: COPY Sessions, line 1
COPY 0
COPY 0
ERROR: duplicate key value violates unique constraint "Users_pkey"
DETAIL: Key (id)=(8758f908-b87f-4376-aaff-507a16ba73ff) already exists.
CONTEXT: COPY Users, line 1
ERROR: multiple primary keys for table "Authors" are not allowed
ERROR: multiple primary keys for table "Notes" are not allowed
ERROR: multiple primary keys for table "Revisions" are not allowed
ERROR: multiple primary keys for table "SequelizeMeta" are not allowed
ERROR: multiple primary keys for table "Sessions" are not allowed
ERROR: multiple primary keys for table "Temp" are not allowed
ERROR: multiple primary keys for table "Temps" are not allowed
ERROR: multiple primary keys for table "Users" are not allowed
ERROR: relation "Users_profileid_key" already exists
ERROR: relation "authors_note_id_user_id" already exists
ERROR: relation "notes_alias" already exists
ERROR: relation "notes_shortid" already exists
Any thoughts on how I can fix it ? Thx
Btw, is this restore command right?
$ cat backup.sql | docker exec -i $(docker-compose ps -q database) psql -U hackmd
I kind of care about what"but last command is" in the document means…Did I get something wrong?