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

Re: Backing up several tables using pg_dump -t

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Cc: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>
Subject: Re: Backing up several tables using pg_dump -t
Date: 2005-09-30 17:01:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Thanks Rajesh.

Is this on TODO list? I think it's beneficial to be able to backup (or
oracle term, export) several tables (NOT only ONE) and restore (import)
back to another database for instance from a production DB to a
development or staging to prod, etc..)  [This is doable in Oracle too
via the export/import utilities.]


-----Original Message-----
From: Rajesh Kumar Mallah [mailto:mallah(dot)rajesh(at)gmail(dot)com] 
Sent: Thursday, September 22, 2005 1:16 PM
To: Tomeh, Husam
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Backing up several tables using pg_dump -t

man pg_dump seems to say it is not possible

       -t table

              Dump  data for table only. It is possible for there to be
              ple tables with the same name in different schemas; if
that  is
              the  case,  all  matching  tables  will  be dumped.
Specify both
              --schema and --table to select just one table.

              Note: In this mode, pg_dump makes no attempt to dump  any
              database objects that the selected table may depend upon.
              fore, there is no guarantee that the results of  a
              dump  can  be  successfully  restored by themselves into a

On 9/23/05, Tomeh, Husam <htomeh(at)firstam(dot)com> wrote:
> I'm having problem backing up several tables using pg_dump. When
> selecting one table only with the '-t'  option, it works just fine.
> I tried to include several tables, pg_dump fails with error that the
> tables specified don't exist. Can you show me an example of backing up
> several tables using pg_dump.
> Thanks in advance,
> --
>  Husam
> ---------------------------(end of
> TIP 6: explain analyze is your friend
> **********************************************************************
> This message contains confidential information intended only for the
> use of the addressee(s) named above and may contain information that
> is legally privileged.  If you are not the addressee, or the person
> responsible for delivering it to the addressee, you are hereby
> notified that reading, disseminating, distributing or copying this
> message is strictly prohibited.  If you have received this message by
> mistake, please immediately notify us by replying to the message and
> delete the original message immediately thereafter.
> Thank you.                                       FADLD Tag
> **********************************************************************
> ---------------------------(end of
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that
>        message can get through to the mailing list cleanly

pgsql-admin by date

Next:From: Tomeh, HusamDate: 2005-09-30 17:09:02
Subject: Re: db connection and script execution error
Previous:From: Jeff FrostDate: 2005-09-30 16:29:17
Subject: Re: archive_command

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