X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6F30BD1B52F for ; Fri, 16 Jan 2004 14:52:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57744-05 for ; Fri, 16 Jan 2004 10:52:02 -0400 (AST) Received: from jefftrout.com (h00a0cc4084e5.ne.client2.attbi.com [24.128.241.68]) by svr1.postgresql.org (Postfix) with SMTP id BCF69D1D236 for ; Fri, 16 Jan 2004 10:51:56 -0400 (AST) Received: (qmail 8604 invoked from network); 16 Jan 2004 14:52:03 -0000 Received: from localhost (HELO squeegit) (threshar@127.0.0.1) by localhost with SMTP; 16 Jan 2004 14:52:03 -0000 Date: Fri, 16 Jan 2004 09:54:29 -0500 From: Jeff To: aspire420@hotpop.com Cc: sank89@sancharnet.in, emurphy1@email.arizona.edu, pgsql-admin@postgresql.org Subject: Re: Snapshot as Backup Message-Id: <20040116095429.0bbc6b86.threshar@torgo.978.org> In-Reply-To: <40045575.60007@sancharnet.in> References: <000901c3d9f8$db4a1cd0$33a48796@ilc.arizona.edu> <40045575.60007@sancharnet.in> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/133 X-Sequence-Number: 11996 On Wed, 14 Jan 2004 02:00:45 +0530 Sai Hertz And Control Systems 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 http://www.jefftrout.com/ http://www.stuarthamm.net/