Обсуждение: pg_dump of a big table

Поиск
Список
Период
Сортировка

pg_dump of a big table

От
Nelson Correia
Дата:

.ExternalClass .EC_hmmessage P {padding:0px;} .ExternalClass body.EC_hmmessage {font-size:10pt;font-family:Verdana;} Hi all,
 
I need to do a backup from a big table that is in a machine with almost no disk space.
Running pg_dump from another machine needs much space on the DB host? Or it just outputs the data as it goes?
 
Is there a better way to do this?
 
Thanks,
 
Nelson



What can you do with the new Windows Live? Find out

Re: pg_dump of a big table

От
Sam Mason
Дата:
On Mon, Jul 13, 2009 at 06:57:43PM +0000, Nelson Correia wrote:
> Running pg_dump from another machine needs much space on the DB
> host? Or it just outputs the data as it goes?

pg_dump should use very little space on the server, it just streams it
out to where ever you tell it.  You could run pg_dump on another host,
or do something like:

  pg_dump mydb | gzip | ssh otherbox "cat > out.sql.gz"


--
  Sam  http://samason.me.uk/

Re: pg_dump of a big table

От
Scott Mead
Дата:

On Mon, Jul 13, 2009 at 3:29 PM, Sam Mason <sam@samason.me.uk> wrote:
On Mon, Jul 13, 2009 at 06:57:43PM +0000, Nelson Correia wrote:
> Running pg_dump from another machine needs much space on the DB
> host? Or it just outputs the data as it goes?

pg_dump should use very little space on the server, it just streams it
out to where ever you tell it.  You could run pg_dump on another host,
or do something like:

 pg_dump mydb | gzip | ssh otherbox "cat > out.sql.gz"

   Yes, from the other machine, run:

  [user@notmyhost ]$ pg_dump -h myhost -U mydbuser mydb > out.sql

--Scott