Re: backup a table

From: Guillaume LELARGE <gleu(at)wanadoo(dot)fr>
To: Miriam Fernández Galicia <msenseif(at)servidor(dot)unam(dot)mx>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: backup a table
Date: 2003-06-11 23:19:36
Message-ID: 200306112319.36176.gleu@wanadoo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

Le Mercredi 11 Juin 2003 20:25, vous avez écrit :
> Hello!!!
> I 'm new in Postgres 7.2 my question is, exists some way to backup only
> a table and no the all database with pg_dump or another utility, too

pg_dump allows you to do this using the -t switch.
Try something like
pg_dump -t mytable mydbname

You should probably redirect stdout to some file like this:
pg_dump -t mytable mydbname > myfile

If you need to specify your user, try something like this one:
pg_dump -U myuser -t mytable mydbname

--
Guillaume.

In response to

  • backup a table at 2003-06-11 20:25:03 from Miriam Fernández Galicia

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Boris Klug 2003-06-12 10:15:46 Indexes destroyed by REINDEX command
Previous Message Miriam Fernández Galicia 2003-06-11 21:52:59 Re: backup a table