Thread: backup a table
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
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
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.
Thank you Guillaume !! 
It works!!
Miriam
El mié, 11 de 06 de 2003 a las 18:19, Guillaume LELARGE escribió:

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