pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
backup a table
3+ messages / 2 participants
[nested] [flat]

* backup a table
@ 2003-06-11 20:25  Miriam Fernández Galicia <msenseif@servidor.unam.mx>
  0 siblings, 1 reply; 3+ messages in thread

From: Miriam Fernández Galicia @ 2003-06-11 20:25 UTC (permalink / raw)
  To: pgsql-admin

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  I
used COPY but my problem is logged like postgres user  the message  that
send me is:

bash-2.05a$ psql gheo -Upostgres
Password: 
psql: FATAL 1:  Password authentication failed for user "postgres"

And like user gheo, I can enter to the database but if I want to use
copy:

gheo=> copy cob_tit TO '/home/gheo/cob_tit.dat' delimiters '|' ;

ERROR:  You must have Postgres superuser privilege to do a COPY directly
to or from a file.  Anyone can COPY to stdout or from stdin.  Psql's
\copy command also works for anyone.

regards

   Miriam Fernández 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: backup a table
@ 2003-06-11 21:52  Miriam Fernández Galicia <msenseif@servidor.unam.mx>
  parent: Guillaume LELARGE <gleu@wanadoo.fr>
  0 siblings, 0 replies; 3+ messages in thread

From: Miriam Fernández Galicia @ 2003-06-11 21:52 UTC (permalink / raw)
  To: Guillaume LELARGE <gleu@wanadoo.fr>; +Cc: pgsql-admin

Thank you Guillaume !!  :)
It works!!
   Miriam


El mié, 11 de 06 de 2003 a las 18:19, Guillaume LELARGE escribió:

> 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
> 

Attachments:

smiley-3.png (image/png, 819B) download view image
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: backup a table
@ 2003-06-11 23:19  Guillaume LELARGE <gleu@wanadoo.fr>
  parent: Miriam Fernández Galicia <msenseif@servidor.unam.mx>
  0 siblings, 1 reply; 3+ messages in thread

From: Guillaume LELARGE @ 2003-06-11 23:19 UTC (permalink / raw)
  To: Miriam Fernández Galicia <msenseif@servidor.unam.mx>; +Cc: 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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-06-11 23:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-11 20:25 backup a table Miriam Fernández Galicia <msenseif@servidor.unam.mx>
2003-06-11 23:19 ` Guillaume LELARGE <gleu@wanadoo.fr>
2003-06-11 21:52   ` Miriam Fernández Galicia <msenseif@servidor.unam.mx>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox