Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
PostgreSQL 8.2 восстановление backup с ошибкой
|
|||
|---|---|---|---|
|
#18+
СУБД PostgreSQL 8.2 cделал утилитой pgAdmin III версия 1.6.2 backup, когда я его пытаюсь восстановить, восстановление идёт с ошибкой: авторC:\Program Files\pgAdmin III\1.6\pg_restore.exe -i -h localhost -p 5432 -U postgres -d zpldatabase -v "D:\Java_Tools\IDE\IdeaProjects\zpl\backup\zpldatabase.backup" pg_restore: connecting to database for restore pg_restore: creating SCHEMA public pg_restore: creating COMMENT SCHEMA public pg_restore: creating PROCEDURAL LANGUAGE plpgsql pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 270; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists Command was: CREATE PROCEDURAL LANGUAGE plpgsql; pg_restore: creating TABLE config pg_restore: [archiver (db)] Error from TOC entry 1281; 1259 16571 TABLE config postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "config" already exists Command was: CREATE TABLE config ( id integer NOT NULL, name_firm character varying(45), stavka_razrada money, fio_direct... pg_restore: creating SEQUENCE config_id_seq pg_restore: [archiver (db)] Error from TOC entry 1280; 1259 16569 SEQUENCE config_id_seq postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "config_id_seq" already exists Command was: CREATE SEQUENCE config_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; pg_restore: creating SEQUENCE OWNED BY config_id_seq pg_restore: executing SEQUENCE SET config_id_seq pg_restore: creating TABLE month pg_restore: [archiver (db)] Error from TOC entry 1277; 1259 16552 TABLE month postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "month" already exists Command was: CREATE TABLE "month" ( id numeric NOT NULL, dat date ); pg_restore: creating TABLE person pg_restore: [archiver (db)] Error from TOC entry 1275; 1259 16545 TABLE person postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "person" already exists Command was: CREATE TABLE person ( id integer NOT NULL, fio character varying(45), doljnost character varying(17), koef_t... pg_restore: creating SEQUENCE person_id_seq pg_restore: [archiver (db)] Error from TOC entry 1276; 1259 16547 SEQUENCE person_id_seq postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "person_id_seq" already exists Command was: CREATE SEQUENCE person_id_seq INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; pg_restore: creating SEQUENCE OWNED BY person_id_seq pg_restore: executing SEQUENCE SET person_id_seq pg_restore: creating TABLE zarpl pg_restore: [archiver (db)] Error from TOC entry 1279; 1259 16561 TABLE zarpl postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "zarpl" already exists Command was: CREATE TABLE zarpl ( id integer NOT NULL, id_person integer, id_month integer, kol_day smallint, razrad ... pg_restore: creating SEQUENCE zarpl_id_seq pg_restore: [archiver (db)] Error from TOC entry 1278; 1259 16559 SEQUENCE zarpl_id_seq postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "zarpl_id_seq" already exists Command was: CREATE SEQUENCE zarpl_id_seq INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; pg_restore: creating SEQUENCE OWNED BY zarpl_id_seq pg_restore: executing SEQUENCE SET zarpl_id_seq pg_restore: creating DEFAULT id pg_restore: creating DEFAULT id pg_restore: creating DEFAULT id pg_restore: restoring data for table "config" pg_restore: restoring data for table "month" pg_restore: restoring data for table "person" pg_restore: restoring data for table "zarpl" pg_restore: [archiver (db)] Error from TOC entry 1625; 0 16561 TABLE DATA zarpl postgres pg_restore: [archiver (db)] COPY failed: ERROR: duplicate key violates unique constraint "zarpl_pkey" CONTEXT: COPY zarpl, line 1: "1 \N \N \N \N \N \N \N \N \N \N \N \N \N \N" pg_restore: creating CONSTRAINT config_pkey pg_restore: [archiver (db)] Error from TOC entry 1622; 2606 16575 CONSTRAINT config_pkey postgres pg_restore: [archiver (db)] could not execute query: ERROR: multiple primary keys for table "config" are not allowed Command was: ALTER TABLE ONLY config ADD CONSTRAINT config_pkey PRIMARY KEY (id); pg_restore: creating CONSTRAINT month_pkey pg_restore: [archiver (db)] Error from TOC entry 1618; 2606 16558 CONSTRAINT month_pkey postgres pg_restore: [archiver (db)] could not execute query: ERROR: multiple primary keys for table "month" are not allowed Command was: ALTER TABLE ONLY "month" ADD CONSTRAINT month_pkey PRIMARY KEY (id); pg_restore: creating CONSTRAINT person_pkey pg_restore: [archiver (db)] Error from TOC entry 1616; 2606 16551 CONSTRAINT person_pkey postgres pg_restore: [archiver (db)] could not execute query: ERROR: multiple primary keys for table "person" are not allowed Command was: ALTER TABLE ONLY person ADD CONSTRAINT person_pkey PRIMARY KEY (id); pg_restore: creating CONSTRAINT zarpl_pkey pg_restore: [archiver (db)] Error from TOC entry 1620; 2606 16568 CONSTRAINT zarpl_pkey postgres pg_restore: [archiver (db)] could not execute query: ERROR: multiple primary keys for table "zarpl" are not allowed Command was: ALTER TABLE ONLY zarpl ADD CONSTRAINT zarpl_pkey PRIMARY KEY (id); pg_restore: setting owner and privileges for SCHEMA public pg_restore: setting owner and privileges for COMMENT SCHEMA public pg_restore: setting owner and privileges for ACL public pg_restore: setting owner and privileges for PROCEDURAL LANGUAGE plpgsql pg_restore: setting owner and privileges for TABLE config pg_restore: setting owner and privileges for SEQUENCE config_id_seq pg_restore: setting owner and privileges for SEQUENCE OWNED BY config_id_seq pg_restore: setting owner and privileges for TABLE month pg_restore: setting owner and privileges for TABLE person pg_restore: setting owner and privileges for SEQUENCE person_id_seq pg_restore: setting owner and privileges for SEQUENCE OWNED BY person_id_seq pg_restore: setting owner and privileges for TABLE zarpl pg_restore: setting owner and privileges for SEQUENCE zarpl_id_seq pg_restore: setting owner and privileges for SEQUENCE OWNED BY zarpl_id_seq pg_restore: setting owner and privileges for DEFAULT id pg_restore: setting owner and privileges for DEFAULT id pg_restore: setting owner and privileges for DEFAULT id pg_restore: setting owner and privileges for CONSTRAINT config_pkey pg_restore: setting owner and privileges for CONSTRAINT month_pkey pg_restore: setting owner and privileges for CONSTRAINT person_pkey pg_restore: setting owner and privileges for CONSTRAINT zarpl_pkey WARNING: errors ignored on restore: 13 Process returned exit code 1. Подскажите, в чём может быть проблема? Как Вы делаете бэкап? Может есть альтернативный способ? :) Спасибо :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.02.2007, 13:10 |
|
||
|
PostgreSQL 8.2 восстановление backup с ошибкой
|
|||
|---|---|---|---|
|
#18+
дважы подряд накатываешь backup? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.02.2007, 13:21 |
|
||
|
PostgreSQL 8.2 восстановление backup с ошибкой
|
|||
|---|---|---|---|
|
#18+
Спасибо разобрался :) Оказывается объекты базы существуют, а я их пытаюсь перезаписать поверху, для того чтобы они удалялись перед восстановлениемм надо делать дамп с ключом "-с". Например: авторpg_dump -u -c zpldatabase > d:\db.sql Восстанавливаю я так: авторpsql -U zpldatabase < "d:\db.sql" Спасибо за обсуэдение :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.02.2007, 20:54 |
|
||
|
|

start [/forum/topic.php?fid=53&msg=34312388&tid=2005723]: |
0ms |
get settings: |
4ms |
get forum list: |
13ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
131ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
| others: | 218ms |
| total: | 427ms |

| 0 / 0 |
