Доброго дня!
развернул zabbix на docker с БД postgres, пробую загрузить дамп с локальной базы на докер
sudo docker exec -i zabbix-postgres /bin/bash -c "PGPASSWORD=zabbix psql --username zabbix zabbix" < /tmp/zabbix109.04.24.dump.sql
но выходят ошибки
DETAIL: Key (groupid)=(53) is not present in table "hstgrp".
ERROR: duplicate key value violates unique constraint "group_prototype_pkey"
DETAIL: Key (group_prototypeid)=(35) already exists.
CONTEXT: COPY group_prototype, line 6
ERROR: duplicate key value violates unique constraint "history_pkey"
DETAIL: Key (itemid, clock, ns)=(206027, 1711259560, 209200253) already exists.
CONTEXT: COPY history, line 1
COPY 0
ERROR: duplicate key value violates unique constraint "history_str_pkey"
DETAIL: Key (itemid, clock, ns)=(122401, 1710783354, 59171874) already exists.
CONTEXT: COPY history_str, line 1
ERROR: duplicate key value violates unique constraint "history_text_pkey"
DETAIL: Key (itemid, clock, ns)=(188718, 1712563606, 799853246) already exists.
CONTEXT: COPY history_text, line 1
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
invalid socket
connection to server was lost
подскажите как перенести данные в новую БД?
развернул zabbix на docker с БД postgres, пробую загрузить дамп с локальной базы на докер
sudo docker exec -i zabbix-postgres /bin/bash -c "PGPASSWORD=zabbix psql --username zabbix zabbix" < /tmp/zabbix109.04.24.dump.sql
но выходят ошибки
DETAIL: Key (groupid)=(53) is not present in table "hstgrp".
ERROR: duplicate key value violates unique constraint "group_prototype_pkey"
DETAIL: Key (group_prototypeid)=(35) already exists.
CONTEXT: COPY group_prototype, line 6
ERROR: duplicate key value violates unique constraint "history_pkey"
DETAIL: Key (itemid, clock, ns)=(206027, 1711259560, 209200253) already exists.
CONTEXT: COPY history, line 1
COPY 0
ERROR: duplicate key value violates unique constraint "history_str_pkey"
DETAIL: Key (itemid, clock, ns)=(122401, 1710783354, 59171874) already exists.
CONTEXT: COPY history_str, line 1
ERROR: duplicate key value violates unique constraint "history_text_pkey"
DETAIL: Key (itemid, clock, ns)=(188718, 1712563606, 799853246) already exists.
CONTEXT: COPY history_text, line 1
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
invalid socket
connection to server was lost
подскажите как перенести данные в новую БД?
Comment