X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 835FFD1C47A for ; Tue, 12 Aug 2003 14:44:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 70783-05 for ; Tue, 12 Aug 2003 11:42:56 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 7E905D1C4BF for ; Tue, 12 Aug 2003 11:44:15 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h7CEhVbS001484; Tue, 12 Aug 2003 08:43:31 -0600 (MDT) Date: Tue, 12 Aug 2003 08:44:28 -0600 (MDT) From: "scott.marlowe" To: Christopher Browne Cc: Subject: Re: Backup routine In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/148 X-Sequence-Number: 9870 On Sun, 10 Aug 2003, Christopher Browne wrote: > Centuries ago, Nostradamus foresaw when pgman@candle.pha.pa.us (Bruce Momjian) would write: > > Christopher Browne wrote: > >> The world rejoiced as peterandsarah@blueyonder.co.uk (Peter and Sarah Childs) wrote: > >> > However there is a third way. That should be safe but some > >> > people may disagree with me! If you can "freeze" the disk while you > >> > take the backup. The backup can be used as if the computer had > >> > crashed with no hard disk failure at all. Ie WAL will be consistant > >> > and database may take longer but once it is up it will be safe (like > >> > paragaph 1). Now freezeing a disk for backup is not that > >> > difficult. You should be doing it anyway for user file > >> > consistancy. (You don't want the first 30 pages of you document to > >> > disagree with the end because somone was saving it during the > >> > backup! > >> > >> I heard D'Arcy Cain indicate that some SAN systems (I think he > >> mentioned NetApp) support this sort of thing, too. Digital's AdvFS > >> also supports it. > >> > >> Of course, if you take this approach, you have to make _certain_ > >> that when you "freeze" a replica of a filesystem, that _ALL_ of the > >> database is contained in that one filesystem. If you move WAL to a > >> different filesystem, bets would be off again... > > > > Also, I assume you have to stop the server just for a moment while > > you do the freeze, right? > > I'm sure that's _preferable_. > > Supposing you don't, the result is that the backup will be treated > much like the condition where a server is "terminated by power > failure," and, at restart, the system will have to rummage around the > WAL to clean up a bit. Note that many NAS storage systems support a "snapshot" mechanism that basically does this in about 1/10th of a second. It produced horrible hickups for our Linux boxen with default NFS settings, whereby our NFS mounts would disappear for three or four minutes after a snapshot. I've never, by the way, run my database on a NAS, and probably never will, if I have any say in it. We just use NAS for static document storage (hundreds of gigs of it.)