pg_dump ,pg_restore problem - Mailing list pgsql-novice

From Martin Ruff
Subject pg_dump ,pg_restore problem
Date
Msg-id 56833.194.209.146.43.1048069711.squirrel@mail.simeon.ch
Whole thread Raw
Responses Re: pg_dump ,pg_restore problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi,
I dump a table and then try to restore and get the error message
[archiever] input file does not appear to be a valid archive

what I do:
pg_dump -d -f reportingdump -t holidaycalendar reporting

this results in the following dump file(some data removed)
--
-- PostgreSQL database dump
--

\connect - mruff

SET search_path = public, pg_catalog;

--
-- TOC entry 2 (OID 17149)
-- Name: holidaycalendar; Type: TABLE; Schema: public; Owner: mruff
--

CREATE TABLE holidaycalendar (
    id serial NOT NULL,
    holidaydate date NOT NULL,
    holidayhours numeric(2,0) NOT NULL,
    description character varying(1000) NOT NULL
);


--
-- Data for TOC entry 6 (OID 17149)
-- Name: holidaycalendar; Type: TABLE DATA; Schema: public; Owner: mruff
--

INSERT INTO holidaycalendar VALUES (1, '1999-01-01', 8, 'Neujahr');
INSERT INTO holidaycalendar VALUES (3, '1999-01-02', 8, 'Berchtoldstag');
...
--
-- TOC entry 5 (OID 17152)
-- Name: holidaycalendar_pkey; Type: CONSTRAINT; Schema: public; Owner: mruff
--

ALTER TABLE ONLY holidaycalendar
    ADD CONSTRAINT holidaycalendar_pkey PRIMARY KEY (id);


--
-- TOC entry 4 (OID 17154)
-- Name: holidaycalendar_holidaydate_key; Type: CONSTRAINT; Schema:
public; Owner: mruff
--

ALTER TABLE ONLY holidaycalendar
    ADD CONSTRAINT holidaycalendar_holidaydate_key UNIQUE (holidaydate);


--
-- TOC entry 3 (OID 17147)
-- Name: holidaycalendar_id_seq; Type: SEQUENCE SET; Schema: public;
Owner: mruff
--

SELECT pg_catalog.setval ('holidaycalendar_id_seq', 1, false);


then I try to restore:
pg_restore -a reportingdump  -d reporting -t holidaycalendar
and get the error:
[archiever] input file does not appear to be a valid archive

thanks for help



-------------------------------------------
Be the change you want to see in the world.



pgsql-novice by date:

Previous
From: Joe Conway
Date:
Subject: Re: Problems using palloc in postgresql user C functions
Next
From: Stephan Szabo
Date:
Subject: Re: [SQL] SERIAL does not ROLLBACK