From: Jeff <threshar@torgo.978.org>
To: aspire420@hotpop.com
Cc: sank89@sancharnet.in
Cc: emurphy1@email.arizona.edu
Cc: pgsql-admin@postgresql.org
Subject: Re: Snapshot as Backup
Date: Fri, 16 Jan 2004 09:54:29 -0500
Message-ID: <20040116095429.0bbc6b86.threshar@torgo.978.org> (raw)
In-Reply-To: <40045575.60007@sancharnet.in>
References: <000901c3d9f8$db4a1cd0$33a48796@ilc.arizona.edu>
<40045575.60007@sancharnet.in>
On Wed, 14 Jan 2004 02:00:45 +0530
Sai Hertz And Control Systems <sank89@sancharnet.in> wrote:
>
> > and all the PostgreSQL files. My question is if I restore this
> > snapshot will PostgreSQL work? I know if doing a typical file
> > system backup of PostgreSQL I must first stop the postmaster or the
> > backup will not produce a useable PostgreSQL system. Is it
> > necessary to stop the postmaster for this snapshot backup also?
> >
I've done testing on this. It works fine.
Just make sure you're doing a filesystem snapshot and not a "cp".
To PG it just looks like the power went out or some other failure.
It'll replay parts of its log and be on its merry way. This is *much*
faster than using pg_dump / pg_restore, especially on huge db's.
If you are using xfs you may want to wrap the snapshot call with
xfs_freeze/unfreeze.
It may also be nice every once in a while to do a normal pg_dump..
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/http://www.stuarthamm.net/
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: threshar@torgo.978.org, aspire420@hotpop.com, sank89@sancharnet.in, emurphy1@email.arizona.edu
Subject: Re: Snapshot as Backup
In-Reply-To: <20040116095429.0bbc6b86.threshar@torgo.978.org>
References: <000901c3d9f8$db4a1cd0$33a48796@ilc.arizona.edu> <40045575.60007@sancharnet.in> <20040116095429.0bbc6b86.threshar@torgo.978.org>
* 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