pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: Gunnar Lindholm <gunix@telia.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backup done by newbie
Date: Thu, 7 Sep 2000 00:44:15 +0200
Message-ID: <20000907004415.B21457@vestdata.no> (raw)
In-Reply-To: <00090621212200.00289@dilbert>
References: <00090621212200.00289@dilbert>

On Wed, Sep 06, 2000 at 08:41:44PM +0200, Gunnar Lindholm wrote:
> Hello.
> I wonder if there is anyone who has administrated a "real" database that could
> tell me something about backup of the database, what tools to use, how to
> acctually do the backup, what backup hardware to use,  and so on.

What OS?

> The reason for asking this is that I might have to do a backup on a database
> soon, and the only idea I have right now is to dump the database and make a tar
> backup of the dumped data.

Can you afford stopping the database?
long enough to make a snapshot?
long enough to copy the data?

On linux, you can use LVM to create snapshots of devices. This enables
you to just shut down the database for seconds while you snapshot. Other
OSes have simular features.

You can also try just copying the data while the server is running, but
there is a chance the data will be corrupted if it gets written to while
you take your backup.
   
> probably go alot faster with some "real" hardware), but what should I do when I
> get 20/2*24*7=1,7 GB of data (not to unrealistic though), i.e. it would take a
> week just to dump the database? Could it be possible to just make a snapshot of
> the database on weekends and during the weeks, just doing "incremental backup"
> i.e. log the transactions?

Snapshotting the device is probably the best way. 

Another idea would be to duplicate all IO (either on SQL level or
systemcall level) to another machine, and build some buffer into this
system so you can stop the writing to your secondary server when you are
running your backups. 


-- 
Ragnar Kjørstad



view thread (3+ messages)

Message-ID: <20000907004415.B21457@vestdata.no>
Permalink:  ../20000907004415.B21457@vestdata.no/
Also on:    postgresql.org/message-id/20000907004415.B21457@vestdata.no

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: postgres@ragnark.vestdata.no, gunix@telia.com
  Subject: Re: Backup done by newbie
  In-Reply-To: <20000907004415.B21457@vestdata.no>
  References: <00090621212200.00289@dilbert> <20000907004415.B21457@vestdata.no>

* 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