Re: pg_dump of a big table

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump of a big table
Date: 2009-07-14 15:27:45
Message-ID: d3ab2ec80907140827u60571af2hb9051a56a706f5b4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 13, 2009 at 3:29 PM, Sam Mason <sam(at)samason(dot)me(dot)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(at)notmyhost ]$ pg_dump -h myhost -U mydbuser mydb > out.sql

--Scott

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-07-14 15:29:44 Re: prepared statements and DBD::Pg
Previous Message Andres Freund 2009-07-14 14:56:22 Re: Best practices for moving UTF8 databases