Received: from cybaea.com (cybaea.com [192.41.45.71]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9H7WRP78089 for ; Wed, 17 Oct 2001 03:32:30 -0400 (EDT) (envelope-from allane@cybaea.com) Received: from cybaea.com (allane@engelhardt.demon.co.uk [193.237.12.86]) by cybaea.com (8.8.5) id BAA24660; Wed, 17 Oct 2001 01:31:47 -0600 (MDT) X-Authentication-Warning: cybaea.com: Host allane@engelhardt.demon.co.uk [193.237.12.86] claimed to be cybaea.com Message-ID: <3BCD33EF.2030909@cybaea.com> Date: Wed, 17 Oct 2001 08:31:59 +0100 From: Allan Engelhardt Organization: http://cybaea.com/ User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.databases.postgresql.admin To: missive@hotmail.com, pgsql-admin@postgresql.org Subject: Re: pg_restore blues References: <3BCC717B.2020500@cybaea.com> <9qik2p$2rkk$1@news.tht.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200110/153 X-Sequence-Number: 2398 Oh, no! Please don't tell me I also can't use BLOB in PostgreSQL. Surely there is a way to backup and restore the *whole* database? I've tried creating the database manually and then $ droplang plpgsql foo before the restore, but that didn't work either. The language is, of course, created in template1. I'm stumped. :-( I can backup my db, but I can't restore it. Not much use, is it...? Allan. Lee Harr wrote: > 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.... > > >