Re: WAL files backup - Mailing list pgsql-admin

From Chad Wagner
Subject Re: WAL files backup
Date
Msg-id 81961ff50702180657kc890731sba4bd16a60cebcf7@mail.gmail.com
Whole thread Raw
In response to Re: WAL files backup  (pedro noticioso <cucnews@yahoo.com>)
List pgsql-admin
On 2/18/07, 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/

pgsql-admin by date:

Previous
From: pedro noticioso
Date:
Subject: Re: WAL files backup
Next
From: Peter Eisentraut
Date:
Subject: Re: 8.2 Admin Pack broken?