Re: backup/restore - another area.

From: Jeff <threshar(at)torgo(dot)978(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: backup/restore - another area.
Date: 2003-10-10 12:08:37
Message-ID: Pine.BSF.4.44.0310100802590.76434-100000@torgo.978.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

On 9 Oct 2003, Greg Stark wrote:

> I don't quite follow your #2 so I can only comment on the above idea of using
> an LVM snapshot. If you have the hardware and the LVM-fu to be able to do this
> properly I would recommend it.
>
Just to be a bit clearer incase it was my wording:

Method #2 is nearly identical to method #1, except that no logical volume
manager is needed. We cannot just cp $PGDATA because it is (or could be)
changing and we need to take data from a constitant point. So what we do
is write code that understands xids and all that and simply "dumps" out
the pages of data in a raw form that can be quickly reloaded. The key is
that the data be in a somewhat consistant state. Method #2 requires a ton
more work but it would be able to run on platforms without an lvm (or
requiring the use of an lvm). Does that make more sense?

The idea here is to backup & restore as fast as possible, throwing away
some things like inter-version compat and whatnot. Being able to add
"fast backup / restore" is a good thing in the list of enterprise
features.

> Also, I wouldn't consider this a replacement for having a pg_dump export. In a
> crisis when you want to restore everything *exactly* the way things were you
> want the complete filesystem snapshot. But if you just want to load a table
> the way it was the day before to compare, or if you want to load a test box to
> do some performance testing, or whatever, you'll need the logical export.
>

Yeah, a pg_dump now and then would be useful (and safe).
If you wanted to get fancy schmancy you could take the snapshot, archive
it, transfer it and unarchive it on machine B. (We actually used to do
that here until machine B no longer had the capacity to hold all our data
:)

--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.jefftrout.com/
http://www.stuarthamm.net/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Treat 2003-10-10 15:06:19 Re: Oracle takes the wraps off SME database
Previous Message Oliver Elphick 2003-10-10 10:28:12 Re: limit the database size

Browse pgsql-performance by date

  From Date Subject
Next Message Thomas Swan 2003-10-10 12:27:22 Re: Compare rows
Previous Message Peter Childs 2003-10-10 11:17:10 Re: way to speed up a SELECT DISTINCT?