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

Re: Restore single table from pg_dumpall.

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Restore single table from pg_dumpall.
Date: 2007-01-22 23:53:08
Message-ID: 200701221553.08503@hal.medialogik.com (view raw or flat)
Thread:
Lists: pgsql-novice
> On 1/23/07, Jim Stalewski <JStalewski(at)visalighting(dot)com> wrote:
> > I have been asked by a programmer to restore a single table from a
> > PG_DUMPALL backup.
> >
> > Is this possible, and if so, would anyone be able to tell me please,
> > what PSQL options and switches are required?  Running PostgreSQL 8.1.3.

This is a lot simpler with a tar or custom format backup from pg_dump.  
Using that, you could dump the ToC and modify it to select the table you 
want to restore.

With a pg_dumpall backup you might just be better off restoring the whole 
thing into an empty cluster, and then dump the one table only from there. 
Unless it's small enough to load into a text editor, of course.

-- 
"A government that robs Peter to pay Paul can always depend upon the support 
of Paul." - George Bernard Shaw


In response to

pgsql-novice by date

Next:From: Duncan GarlandDate: 2007-01-23 11:13:56
Subject: Re: [SPAM] Restore single table from pg_dumpall.
Previous:From: Andrej Ricnik-BayDate: 2007-01-22 23:48:04
Subject: Re: Restore single table from pg_dumpall.

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