Skip site navigation (1) Skip section navigation (2)

Re: Failed to restore/recreate database (one more piece of info)

From: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Failed to restore/recreate database (one more piece of info)
Date: 2009-11-17 06:57:41
Message-ID: C7278965.8BCC%tsakai@gallo.ucsf.edu (view raw or flat)
Thread:
Lists: pgsql-admin
Hi Tom,

Many thanks for your assistance.

I am on my way.  Here's what I am doing:

  dropdb musket
  createdb musket
  pg_dump canon > canon.dump
  psql -d musket -f canon.dump

I am on the 4th step.  But I could achieve the same with:

  dropdb musket
  createdb musket
  pg_dump canon | psql -d musket -f -

can't I?  Aside from styling, there is no functional difference
between two procedures, is there?

Thank you.

Regards,

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu


On 11/16/09 10:42 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu> writes:
> Now that I am thinking, maybe the file made by pg_dumpall has
> "canon" encoded and therefore what I did logically did not copy
> any canon tables into musket?  Could this be the case?

Yup, exactly.  It would have created canon and restored into that.

> If so, how would I duplicate an existing database and call it
> with a different name?

Use pg_dump not pg_dumpall.

                        regards, tom lane


In response to

Responses

pgsql-admin by date

Next:From: Guillaume LelargeDate: 2009-11-17 17:25:09
Subject: Re: Failed to restore/recreate database (one more piece of info)
Previous:From: Devrim GÜNDÜZDate: 2009-11-17 04:14:29
Subject: Re: Differences in installing Postgres 8.3.8

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group