Re: Server Backup: pg_dump vs pg_dumpall

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: APseudoUtopia <apseudoutopia(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Server Backup: pg_dump vs pg_dumpall
Date: 2009-07-20 22:37:50
Message-ID: 4A64F1BE.50202@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

APseudoUtopia wrote:
> I'm writing a backup script. Right now, I only have one database on my
> postgresql server. I'm deciding if I should use pg_dump or pg_dumpall
> when backing up the server. As far as I can tell, pg_dumpall cannot
> compress the dumps automatically and it only dumps data in the
> standard SQL text file format. This means that I would not be able to
> use pg_restore to selectively restore the database, correct?
>
> What is *NOT* included in a pg_dump that IS in pg_dumpall (Other than
> all the databases)? Things like user-defined functions and datatypes?
> Roles? Views?
>
> I was leaning towards pg_dumpall, but then I realized that it only
> dumps in the standard SQL text file format, and it cannot be
> compressed automatically.

Things that span all databases in your cluster (like your roles) do not
get saved with pg_dump. So yes, if you only have one database,
pg_dumpall is probably what you should be using. You can always pipe the
output of pg_dumpall to your compression program of choice.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2009-07-20 22:44:03 killing processes
Previous Message Raji Sridar (raji) 2009-07-20 22:36:12 Re: Concurrency issue under very heay loads