pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_restore blues
3+ messages / 2 participants
[nested] [flat]

* pg_restore blues
@ 2001-10-16 17:42 Allan Engelhardt <allane@cybaea.com>
  2001-10-17 00:40 ` Re: pg_restore blues Lee Harr <missive@frontiernet.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Allan Engelhardt @ 2001-10-16 17:42 UTC (permalink / raw)
  To: pgsql-admin

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
Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR:  ProcedureCreate: procedure pltcl_call_handler already exists with same arguments
'.
$ pg_restore --create --clean -d test /tmp/foo.dump
Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR:  index "users_id_key" does not exist
'.

What's the magic command that I am looking for??


Allan




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_restore blues
  2001-10-16 17:42 pg_restore blues Allan Engelhardt <allane@cybaea.com>
@ 2001-10-17 00:40 ` Lee Harr <missive@frontiernet.net>
  2001-10-17 07:31   ` Re: pg_restore blues Allan Engelhardt <allane@cybaea.com>
  0 siblings, 1 reply; 3+ messages in thread

From: missive@frontiernet.net @ 2001-10-17 00:40 UTC (permalink / raw)
  To: pgsql-admin

On Tue, 16 Oct 2001 18:42:19 +0100, Allan Engelhardt <allane@cybaea.com> 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....





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_restore blues
  2001-10-16 17:42 pg_restore blues Allan Engelhardt <allane@cybaea.com>
  2001-10-17 00:40 ` Re: pg_restore blues Lee Harr <missive@frontiernet.net>
@ 2001-10-17 07:31   ` Allan Engelhardt <allane@cybaea.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Allan Engelhardt @ 2001-10-17 07:31 UTC (permalink / raw)
  To: missive@hotmail.com; pgsql-admin

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 <allane@cybaea.com> 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....
> 
> 
> 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-10-17 07:31 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 17:42 pg_restore blues Allan Engelhardt <allane@cybaea.com>
2001-10-17 00:40 ` Lee Harr <missive@frontiernet.net>
2001-10-17 07:31   ` Allan Engelhardt <allane@cybaea.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox