Database fails to initialize or resync after restoring backup

I am using pgbackrest to restore my database. Restore is successful sometimes, sometimes it fails with db failed to initialize or resync error on master keeper. What could be the reason for this failure randomly? This usually occurs when Im promoting previous standby to master after restore.

Dear @MairaTariq16, hello,
could you please share your experience with restoration using pgbackrest? I would really appreciate your help in that question.
I’m stucked and all methods \ commands I’m using provide me with 0 result…