pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryan White <bryan@arcamax.com>
To: Emils Klotins <emils@dot.lv>
To: pgsql-sql@postgresql.org
Subject: Re: Backup?
Date: Tue, 27 Jun 2000 12:17:11 -0400
Message-ID: <015701bfe053$2974efa0$2dd260d1@arcamax.com> (raw)
References: <3958C38D.19942.24191291@localhost>

> Hello,
>
> I had a look for 'backup' on the mailing list archives and strangely
> enough didn't find a message containing the word in admin, general
> and sql mailing lists... I am sure this must have been asked before,
> but still:
>
> Would it be possible to backup a db by just copying the dir struct
> under the PG_DATA or must I absolutely use pg_dump? I am
> using Postgres 7.0. The purpose of the backup is of course to have
> a copy handy if eg the harddrive breaks. As I understand pg_dump
> could be comparatively slower, plus it produces a text format
> dumpfile, which could be kind of large in my db in future.

The pg_dump will in general be smaller.  There is a fair amount of overhead
in fitting rows into page boundaries.  Also the indexes are not backed up.
Here are some datapoints from my system.  I have a datadirectory that is
2.4GB.  A pg_dump from that is 800MB (about 400MB compressed).  My nightly
dump currently takes about 10 minutes during which the database is not down.
A reload takes 100 minutes including a vacuum analyze.  I also sleep better
knowing the data is in a readable text format that I could work with if I
had to.




view thread (10+ messages)  latest in thread

Message-ID: <015701bfe053$2974efa0$2dd260d1@arcamax.com>
Permalink:  ../015701bfe053$2974efa0$2dd260d1@arcamax.com/
Also on:    postgresql.org/message-id/015701bfe053$2974efa0$2dd260d1@arcamax.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bryan@arcamax.com, emils@dot.lv
  Subject: Re: Backup?
  In-Reply-To: <015701bfe053$2974efa0$2dd260d1@arcamax.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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