Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8F4CC9FB3BB for ; Sun, 18 Feb 2007 10:57:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 22636-08 for ; Sun, 18 Feb 2007 10:57:12 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by postgresql.org (Postfix) with ESMTP id 0D83C9FA43F for ; Sun, 18 Feb 2007 10:57:12 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so2232926nfb for ; Sun, 18 Feb 2007 06:57:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=KAJ8iiwis8MkPHfQI87ESd+XV5v7hazvJGkjBr6rYbcby9gX1u2c1mSC6fsAecEWcfwCA4clfJB/vS+uedw0VTvAKUoh6rSgIu5eVhtQTTS2/pkPLD781osDjC096CAqp2iJCnBxq7BjwylWYX3I7WuPbToUFYpE7z5OPS7ORr4= Received: by 10.49.41.18 with SMTP id t18mr4685233nfj.1171810631325; Sun, 18 Feb 2007 06:57:11 -0800 (PST) Received: by 10.49.75.11 with HTTP; Sun, 18 Feb 2007 06:57:11 -0800 (PST) Message-ID: <81961ff50702180657kc890731sba4bd16a60cebcf7@mail.gmail.com> Date: Sun, 18 Feb 2007 09:57:11 -0500 From: "Chad Wagner" To: "pedro noticioso" Subject: Re: WAL files backup Cc: "Alvaro Herrera" , pgsql-admin@postgresql.org In-Reply-To: <525241.48113.qm@web55403.mail.re4.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_35841_27859775.1171810631040" References: <20070217003331.GE9724@alvh.no-ip.org> <525241.48113.qm@web55403.mail.re4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/263 X-Sequence-Number: 24728 ------=_Part_35841_27859775.1171810631040 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2/18/07, pedro noticioso wrote: > > -rw------- 1 postgres staff 234 2007-02-16 10:12 > 000000010000000000000003 > -rw------- 1 postgres staff 234 2007-02-16 10:12 > 000000010000000000000004 > -rw------- 1 postgres staff 234 2007-02-16 10:12 > 000000010000000000000005.0024FD70.backup Are these files 234 bytes long? Also, where is the 05 logfile? Can you post your archive_command? > LOG: could not read from log file 0, segment 5 at > offset 2416640: No such file or directory > This is because your archived logs are partial, it is expecting to read XLOG_BLCKSZ and it had a partial read. Clearly you are doing something wrong, but there just isn't enough information. I wrote an article about performing a hot backup with a Perl script that I wrote called pg_hotbackup (available on pgfoundry), you can look at it here: http://www.postgresqlforums.com/wiki/Backup_%26_Recovery But you must follow the PostgreSQL documentation for setting up the archive_command, which is more or less this: archive_command = 'cp -i %p /var/lib/pgsql/backups/%f pedro noticioso <cucnews@yahoo.com> wrote:
-rw-------  1 postgres staff  234 2007-02-16 10:12
000000010000000000000003
-rw-------  1 postgres staff  234 2007-02-16 10:12
000000010000000000000004
-rw-------  1 postgres staff  234 2007-02-16 10:12
000000010000000000000005.0024FD70.backup

Are these files 234 bytes long?  Also, where is the 05 logfile?  Can you post your archive_command?
 
LOG:  could not read from log file 0, segment 5 at
offset 2416640: No such file or directory

This is because your archived logs are partial, it is expecting to read XLOG_BLCKSZ and it had a partial read.  Clearly you are doing something wrong, but there just isn't enough information.

I wrote an article about performing a hot backup with a Perl script that I wrote called pg_hotbackup (available on pgfoundry), you can look at it here:
http://www.postgresqlforums.com/wiki/Backup_%26_Recovery

But you must follow the PostgreSQL documentation for setting up the archive_command, which is more or less this:
archive_command = 'cp -i %p /var/lib/pgsql/backups/%f </dev/null'              


Also documented on that page is the recovery procedure.  It is all based on the PostgreSQL documentation and has worked fine in my testing.

--
Chad
http://www.postgresqlforums.com/ ------=_Part_35841_27859775.1171810631040--