Re: Restore for Hot Standby: could not restore file return code 32256

From: Gabriele Lohss <gabriele(dot)lohss(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Restore for Hot Standby: could not restore file return code 32256
Date: 2014-03-13 14:18:54
Message-ID: CANo3p7_kJ+VsNaFdcnpVPb26pKKQR1VdKRoeTuBw4djNJVk7ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

oh, after some time I saw my stupid mistake:

forgot the cp in the restore_command. It couldn't work.

regards,
gaby

2014-03-13 14:56 GMT+01:00 Gabriele Lohss <gabriele(dot)lohss(at)gmail(dot)com>:

> Hi,
>
> I'm running Postgresql 9.2 on SLES 11 (Suse Enterprise). I want to use the
> archived WALs for a PITR Backup and a Hot Standy server. So I did a
> file-system based backup and let the main server archive all its WALs in an
> extra archive. This is working fine. Now i want to restore the backup to
> use it for a Hot Standby Server.
>
>
> I got following configurations:
>
> main server:
> wal_level = hot_standby
> archive_mode = on
> archive_command = 'cp ........'
>
> standby:
> wal_level = hot_standby
> hot_standby = on
>
> recovery.conf on standby:
> restore_command = '/path/archive/%f %p'
> standby_mode = on
>
> Now i can''t start the standby and receive following message in the logs:
> 2014-03-13 13:16:47 UTC LOG: database system was interrupted; last
> known up at 2014-03-12 17:26:50 UTC
> 2014-03-13 13:16:47 UTC LOG: entering standby mode
> sh: /pgsql-replication/archive/00000001000001FE00000052: Permission denied
> 2014-03-13 13:16:47 UTC FATAL: could not restore file
> "00000001000001FE00000052" from archive: return code 32256
> 2014-03-13 13:16:47 UTC LOG: startup process (PID 16806) exited with
> exit code 1
> 2014-03-13 13:16:47 UTC LOG: aborting startup due to startup process
> failure
>
> I checked the path and the permissions for postgres to write and read in
> the directory where the wals are written in. It should work. I could copy
> the file-backup a postgres user from a directory with the same permissions.
>
> 1.Is there something I missed?
> 2. Do I need to use archive_mode = on and archive_command on the Hot
> Standby too?
>
> Thanks for any help or suggestions,
>
> Gaby
>
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message CS DBA 2014-03-13 21:27:51 Internationalization
Previous Message Gabriele Lohss 2014-03-13 13:56:27 Restore for Hot Standby: could not restore file return code 32256