On Mon, Jul 18, 2016 at 7:35 AM, Francisco Reyes <lists@xxxxxxxxxxx> wrote: > I turned on archive_command and have wal archiving going. > > I did a pg_basebackup and copied the resulting file from source machine to > target, yet when I restore I am getting > > requested WAL segment 00000005000008AE0000009B has already been removed This is decided by the backup_label file located in the backup > The earliest WAL archives I have are > > 00000005000008D20000005C.00000028.backup.gz > 00000005000008D20000005C.gz > 00000005000008D20000005D.gz > > Why is the pg_basebackup restore looking for a WAL file that is even older > than the ones I have, when I turned on WAL archiving before I started the > pg_basebackup? > > Also, why is that one WAL archive named differently with .backup? This gives an indication where a backup has been taken. Depending on the situation, like node promotion, there could be as well timeline history files. > Any suggestions? It seems to me that you do not retain enough history, or simply that you did not turn on WAL archiving before taking the base backup.. In the current situation and you don't have those segments, the backup you took is likely useless. It may not be able to reach a consistent state. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general