Skip site navigation (1) Skip section navigation (2)

Re: Snapshot as Backup

From: Jeff <threshar(at)torgo(dot)978(dot)org>
To: aspire420(at)hotpop(dot)com
Cc: sank89(at)sancharnet(dot)in, emurphy1(at)email(dot)arizona(dot)edu,pgsql-admin(at)postgresql(dot)org
Subject: Re: Snapshot as Backup
Date: 2004-01-16 14:54:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, 14 Jan 2004 02:00:45 +0530
Sai Hertz And Control Systems <sank89(at)sancharnet(dot)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

It may also be nice every once in a while to do a normal pg_dump.. 

Jeff Trout <jeff(at)jefftrout(dot)com>

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2004-01-16 15:47:42
Subject: Re: can't create db from PHP
Previous:From: Chris GamacheDate: 2004-01-16 13:34:17
Subject: Protect pg_xlog ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group