Re: recovery via base + WAL replay failure

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Rob Adams <robfadams(at)cox(dot)net>
Cc: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: recovery via base + WAL replay failure
Date: 2008-08-04 08:03:07
Message-ID: 4896B7BB.8090005@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rob Adams wrote:
> I'm trying to demonstrate recovery using the "continuous archiving"
> backup technique. I'm using 8.3 on Windows.
>
> I made a base backup while the postgres was running using the following
> batch file:
>
> --------------------------
> psql -d test_database -U user_name -c "SELECT pg_start_backup('test');"
>
> 7za a -tzip "C:\backup\base.zip" "C:\Program Files\PostgreSQL\8.3\data"
>
> psql -d test_database -U user_name -c "SELECT pg_stop_backup();"
> --------------------------
>
> No indication of any errors. However, I am unable to recover. Here are
> my steps:
>
> 1. Stop service, replace the data directory w/ the base backup.
> 2. Create recovery.conf with this setting:
> restore_command = 'copy C:\backup\%f "%p"'
> 3. Try to start service
>
> After about 90 seconds, the dos prompt displays:
> "(postgres 8.3) service could not be started"
> "The service did not report an error"
>
> Does anyone know what I am probably doing wrong?

You'll need to look at the PostgreSQL logs to see what they say.

But I'm curious about the 7za step. It gives no errors or warnings?
IIRC, you need to use VSS on Windows to avoid sharing violations when
opening the files unless a specific open mode is used. It could be that
7za uses that by default, but it's also possible tha tit's not actually
backing up all files...

//Magnus

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Markus Lehmann 2008-08-04 09:00:30 postgres-r patch: autoconf/make problem
Previous Message Sim Zacks 2008-08-04 06:24:33 Re: bytea encode performance issues