Re:[GENERAL] restoring one table?

From: Tom Tom <cobold(at)seznam(dot)cz>
To: Brian Maguire <bmaguire(at)vantage(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>, Kevin MacClay <kmacclay(at)vantage(dot)com>
Subject: Re:[GENERAL] restoring one table?
Date: 2008-08-08 09:35:33
Message-ID: 91.109-19155-1577523425-1218188132@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Brian Maguire wrote:
> We need to restore one table from a backup. What is the proper way to do this?
>
> Our backup command looks like this:
>
> pg_dump -C -Fc -S postgresql mydatabase > today.backup.sqlc
>
> I am using PostgreSQL 8.1.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
>

Use the switch --table=NAME of pg_restore, i.e. something like this:

pg_restore -C -F c S postgresql -d mydatabase --table=your_table -v today.backup.sqlc

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-08-08 13:28:10 Re: Initdb problem on debian mips cobalt: Bus error
Previous Message Tom Tom 2008-08-08 09:26:18 Re: [GENERAL] pg_restore fails on Windows