Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9H15LP42406 for ; Tue, 16 Oct 2001 21:05:21 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f9H0f1s93852 for pgsql-admin@postgresql.org; Tue, 16 Oct 2001 20:41:01 -0400 (EDT) (envelope-from news) From: missive@frontiernet.net (Lee Harr) X-Newsgroups: comp.databases.postgresql.admin Subject: Re: pg_restore blues Date: Wed, 17 Oct 2001 00:40:57 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 30 Message-ID: <9qik2p$2rkk$1@news.tht.net> References: <3BCC717B.2020500@cybaea.com> Reply-To: missive@hotmail.com X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.0 (FreeBSD) To: pgsql-admin@postgresql.org X-Archive-Number: 200110/156 X-Sequence-Number: 2401 On Tue, 16 Oct 2001 18:42:19 +0100, Allan Engelhardt wrote: > OK, I'm probably doing something very stupid, but can somebody explain how I'm supposed to restore a custom archive dump? > > $ createdb foo > CREATE DATABASE > $ psql foo > foo=# create table users (id serial); > NOTICE: CREATE TABLE will create implicit sequence 'users_id_seq' for SERIAL column 'users.id' > NOTICE: CREATE TABLE/UNIQUE will create implicit index 'users_id_key' for table 'users' > CREATE > foo=# \q > $ pg_dump --blobs --clean --create --file=/tmp/foo.dump --format=c --compress=9 foo > $ dropdb foo > DROP DATABASE > $ pg_restore --create -d test /tmp/foo.dump I never use pg_restore... Actually did not know it was there. I always use psql: psql create database restordbname; \c restordbname \i foo.dump \q Of course I also do not use blobs....