Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A158E6502A0 for ; Wed, 27 Aug 2008 11:18:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12121-03-2 for ; Wed, 27 Aug 2008 11:18:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by postgresql.org (Postfix) with ESMTP id 544BB650148 for ; Wed, 27 Aug 2008 11:18:18 -0300 (ADT) Received: by mu-out-0910.google.com with SMTP id i2so2186120mue.3 for ; Wed, 27 Aug 2008 07:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=gkM/9ZgmT43WOF0og9Mfxa4hgXRxhqRRre/y6PbiGW8=; b=e0l4e5QfCMszSmm5XX6f33p7nNR6Ep1r1RXRjOUmXKiTjPvjcEt4+3cDj8tFNHZYQV X9GavxgrpxEnVsDaeTunOFOIwJVqzDJGx8iYJ3Y4FpdQ5Y7r7LbkzlJBI0Jb5HTieMV9 aXQ/LEGqiioOL1zyRdEATCPZfKQAH9nlm6IIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=uzRhGxWKoCYR5dHcepOuaJIVUdG9S5wFcUMatAtTaaMa86yG8Y7GqcIA1HBUwjL2r6 W6eWTApR9/ZkAwRSJT/3+OHLU1wjanFQFgQ05xhbLa7JDRicfye0Ipb+NNKcZUWeHhQc EUjg2qzdy411bJB0vkv8HxE1BZ0AWfLt5hf90= Received: by 10.103.225.11 with SMTP id c11mr5600mur.32.1219846695023; Wed, 27 Aug 2008 07:18:15 -0700 (PDT) Received: by 10.103.12.18 with HTTP; Wed, 27 Aug 2008 07:18:14 -0700 (PDT) Message-ID: Date: Wed, 27 Aug 2008 10:18:14 -0400 From: "Merlin Moncure" To: "Michael Nolan" Subject: Re: [GENERAL] PITR - base backup question Cc: "Richard Broersma" , "pgsql-general@postgresql.org" , pgsql-admin@postgresql.org In-Reply-To: <4abad0eb0808270652g3c65caefg2ba065d63830a9d9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <396486430808261553k6687500q19f4117b6c71ae3f@mail.gmail.com> <396486430808261804l93855f1gf86d92541a80141@mail.gmail.com> <4abad0eb0808270618w785f34f1pcb2c8d9b062f2d42@mail.gmail.com> <4abad0eb0808270652g3c65caefg2ba065d63830a9d9@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/197 X-Sequence-Number: 30042 On Wed, Aug 27, 2008 at 9:52 AM, Michael Nolan wrote: >> This is a nice touch. With a little bash-fu you could do a find | >> xargs rm and list/kill the files in one pass. In the standby setups >> I've done I usually script the whole process, a prep on the main and a >> startup on the standby. > > The scripts to create the system level backups and copy them to the backup > servers and to rsync the WAL files are both cron jobs. > > I've considered writing a script to do all the restore tasks on the backup > server, but I figure if someone other than me ever has to do it, for example > if there is a problem when I'm unavailable, that person will probably want > to watch the entire process carefully, since he or she will be far less > familiar with the configuration. Here are some basic facts of life about PITR/log shipping. It is a disaster prevention feature. Here's the scenario: You are going to depend upon it on 3 a.m. early saturday morning three years in the future, only you are not going to be there. A drive just went out on the main, but instead of degrading the entire backplane went amber. You are going to be in Barbados on your honeymoon, with no connectivity to the outside world (your blushing bride made you leave the laptop at home). The guy doing the switchover to the standby is the only one that could be gotten a hold of, he still hasn't gotten over the 12 hour bender from Friday. He's never really understood why your company took your advice and went with PostgreSQL instead of SQL Server, is cranky, and doesn't like you that much. He secretly hopes the standby wont come up and barely knows how to use a console. write the script. test it. merlin