Re: Restoring 2 Tables From All Databases Backup

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restoring 2 Tables From All Databases Backup
Date: 2011-10-05 14:38:32
Message-ID: CAHHcreoH-QD2k9KaJ-HPZRPCkR8enfW3k6tzVgBaWBDpVhhMzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2011/10/5 Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com>:
> About 1 month ago, I take a complete databases backup of my Database server
> through pg_dumpall command.
> Today I need to extract or restore only 2 tables in a database.
>
> Is it possible or I have to restore complete Databases again. Size of backup
> is 10 GB in .sql.gz format.

If your dump was created using custom format [1] (pg_dump
--format=custom or -Fc) you can do a pg_restore using --use-list and
--list [2].

[1] http://www.postgresql.org/docs/current/interactive/app-pgdump.html#PG-DUMP-OPTIONS
[2] http://www.postgresql.org/docs/current/interactive/app-pgrestore.html#APP-PGRESTORE-OPTIONS

--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-10-05 14:39:14 Re: null values in a view
Previous Message hubert depesz lubaczewski 2011-10-05 14:31:47 Re: null values in a view