X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D92578B9CC3 for ; Thu, 3 Feb 2005 14:54:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36852-10 for ; Thu, 3 Feb 2005 14:54:50 +0000 (GMT) Received: from mail.deg.cc (mail.deg.cc [64.139.134.201]) by svr1.postgresql.org (Postfix) with ESMTP id 307A88B9B58 for ; Thu, 3 Feb 2005 14:54:51 +0000 (GMT) Received: from deg.cc (kyle.deg.cc [198.70.16.205]) by mail.deg.cc (Postfix) with ESMTP id 30DCD55F96; Thu, 3 Feb 2005 09:54:49 -0500 (EST) Message-ID: <42023B3A.9010703@deg.cc> Date: Thu, 03 Feb 2005 09:54:50 -0500 From: Pallav Kalva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Morus Walter Cc: pgsql-admin@postgresql.org Subject: Re: Online Backup and WAL archives References: <16895.32035.914311.612690@tanto-xipolis.de> <15479.1107277351@sss.pgh.pa.us> <4200E2DC.6020803@deg.cc> <16896.60593.751654.61839@tanto-xipolis.de> In-Reply-To: <16896.60593.751654.61839@tanto-xipolis.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/20 X-Sequence-Number: 16188 yes, documentation points to the recovery_target_time(timestamp) option in this regard, sorry i missed that. but there is one thing which is still not clear to me is if we restore the database to some time back , what happens to WAL files in the pg_xlog directory ? if we still keep those files there, arent they out of sync ? since we are going back in time and we dont need the WAL logs after the recovery_target_time(timestamp), or is it that restore command takes care everything automatically ? the manual doesnt clearly say what happens to the WAL logs in pg_xlog in case if we use the recovery_target_time(timestamp) option. In Oracle i know that there is a option of resetting the logs if we have to restore some time in back, not sure how it works in new Postgres 8. Morus Walter wrote: >Pallav Kalva writes: > > >> If I want to restore to a particular point in time lets say to the >>point in time like a day back when one of my table was dropped >>accidentally and if i want restore the archive log only to that >>particular archive log file . what is the procedure we should follow ? >>just keep the archive logs in the directory until the last archive log >>file i need or is there a command something like " restore only until >>at this archive log file " ? Also what happens to the transaction log >>files in pg_xlog directory in this scenario ? do i have to still keep >>them or they get created by themself since i am going a day back ? >> >> Is this possible in postgres 8 >> >> >> >Yes. That's what PITR is about. Read the manual for details. >If you look at the recovery.conf.sample you'll find a variable >recovery_target_time that must be set. Unless I missed something this >isn't explicitly stated in the docs but the comment in the sample conf >is pretty clear. >Alternatively you can define a transaction id (recovery_target_xid). > >Of course you must have a backup created before the incident and all WALs >up to the time of the incident. > >Morus > >---------------------------(end of broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > >