oh, after some time I saw my stupid mistake:
forgot the cp in the restore_command. It couldn't work.2014-03-13 14:56 GMT+01:00 Gabriele Lohss <gabriele.lohss@xxxxxxxxx>:
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_standbyarchive_mode = onarchive_command = 'cp ........'standby:wal_level = hot_standbyhot_standby = onrecovery.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 failureI 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