Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 3AB412E0076 for ; Fri, 9 May 2008 03:50:38 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 96940-06 for ; Fri, 9 May 2008 03:50:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128087.authsmtp.co.uk (outmail128087.authsmtp.co.uk [62.13.128.87]) by developer.postgresql.org (Postfix) with ESMTP id 7FF5F2E0067 for ; Fri, 9 May 2008 03:50:34 -0300 (ADT) Received: from mail.authsmtp.com (mail.authsmtp.com [62.13.128.187]) by punt4.authsmtp.com (8.14.1/8.14.1/Kp) with ESMTP id m496oWhn092814 for ; Fri, 9 May 2008 07:50:32 +0100 (BST) Received: from [192.168.0.3] (85-211-73-85.dyn.gotadsl.co.uk [85.211.73.85]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m496oKiP053641 for ; Fri, 9 May 2008 07:50:28 +0100 (BST) Subject: .backup files not needed? From: Simon Riggs To: pgsql-docs@postgresql.org Content-Type: text/plain Date: Fri, 09 May 2008 07:51:53 +0100 Message-Id: <1210315913.4268.532.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: 37d3238c-1d94-11dd-941c-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MOFUSTAAU PkFRNXJLN0YASktU QCdXRQsWBxNxUHwI OkNObwVdalpOWA9v UEJKQBxaERtqAB0f AR0AWhxtdQBZeDAt YU9kAQsCPER/dkB5 QwBVHGkEK2RnPGMd U0gLagIAeQdXfx4R Pk12UHJefGUHZ3to QgNoYG86NCMZIi1e QRwVZVwTRUsQVjg7 W1gEEDgjEEFSL2Qg X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:953/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/17 X-Sequence-Number: 4903 Just had questions from a replication user about why the .backup file is described as "can ordinarily be ignored" and is considered optional by recovery also even when pg_start_backup() was used. If the file was created, it is necessary to use it in recovery, so should never be ignored as the docs imply. Can we remove the phrase ", and can ordinarily be ignored." ? from doc/src/sgml/backup.sgml To make use of the backup, you will need to keep around all the WAL segment files generated during and after the file system backup. To aid you in doing this, the pg_stop_backup function creates a backup history file that is immediately stored into the WAL archive area. This file is named after the first WAL segment file that you need to have to make use of the backup. For example, if the starting WAL file is 0000000100001234000055CD the backup history file will be named something like 0000000100001234000055CD.007C9330.backup. (The second part of the file name stands for an exact position within the WAL file, and can ordinarily be ignored.) Once you have safely archived the file system backup and the WAL segment files used during the backup (as specified in the backup history file), all archived WAL segments with names numerically less are no longer needed to recover the file system backup and can be deleted. However, you should consider keeping several backup sets to be absolutely certain that you can recover your data. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com