That should be true about `/data1_node5/arch/00000001.history' since there may not be any timelines created by previous archiver recoveries
But the message
cp: cannot stat `/data1_node5/arch/000000010000000000000007''
suggests that it was not able to restore one of the log files while doing the recovery So it can be treated as an error I guess due to missing log file in the archive folder. That might be due to the archive command not setup correctly and as a result it was not able to copy files from pg_xlog to archive folder.
"Shoaib Mir" <shoaibmir@gmail.com> writes: > While running the recovery process I am getting the following errors for > cannot stat:
> cp: cannot stat `/data1_node5/arch/00000001.history': No such file or > directory
What makes you think this is an error? As pointed out in the docs, the archive_recovery command *will* be asked for files that don't exist. You might want to tweak your script to not report an error in this case.