Re: Bad recovery: no pg_xlog/RECOVERYXLOG

From: Marcin Koziej <marcin(at)cahoots(dot)pl>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Bad recovery: no pg_xlog/RECOVERYXLOG
Date: 2017-10-25 18:20:34
Message-ID: ae7f2ee9-97ff-267e-b6dc-9399250a9314@cahoots.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Now it's fixed, but if anyone needs I'm attaching all scripts to 1)
backup and restore wal's and 2) backup and restore base backup from
OpenStack SWIFT

Marcin Koziej

GPG key: http://go.cahoots.pl/gpg/ Ϟ Twitter: @movonw

On 25.10.2017 19:30, Samed YILDIRIM wrote:
> Hi Marcin,
>  
> Could you please share archive_command and restore_command you used?
> If you are using script inside restore or archive comman, please also
> share them. It looks like the problem relevant with them.
>  
> Best regards.
> Samed YILDIRIM
>  
>  
> 25.10.2017, 19:52, "Marcin Koziej" <marcin(at)cahoots(dot)pl>:
>>
>> Hi!
>>
>> I try to setup continuous archiving with PG 9.6 according to this
>> documentation:
>> https://www.postgresql.org/docs/9.6/static/continuous-archiving.html
>>
>> I have Postgres wal_archive set to replica, I have archive on and
>> archive command is properly copying WAL segments to backup storage.
>>
>> Having this running, I make a successful tar base backup using
>> pg_basebackup.
>>
>> I then stop the DB, remove the data directory, unpack base backup to it,
>> create recovery.conf with a proper restore_command, run the server,
>> and get:
>>
>> LOG:  database system was interrupted; last known up at 2017-10-25
>> 15:47:37 UTC
>> LOG:  starting archive recovery
>> Object 'pg_small3/pg_xlog/RECOVERYXLOG.lzo' not found
>> Cannot download pg_xlog/RECOVERYXLOG.lzo
>> LOG:  invalid checkpoint record
>> FATAL:  could not locate required checkpoint record
>> HINT:  If you are not restoring from a backup, try removing the file
>> "/var/lib/postgresql/data/backup_label".
>> LOG:  startup process (PID 20) exited with exit code 1
>> LOG:  aborting startup due to startup process failure
>> LOG:  database system is shut down
>>
>> The message about "pg_xlog/RECOVERYXLOG.lzo" is written out by
>> restore_command. Indeed, the file is not in the backup storage, and
>> pg_xlog/RECOVERYXLOG was NEVER sent there by archive_command (which
>> compresses and adds .lzo extension)!
>>
>> What could I be doing wrong?
>>  
>>
>> --
>> Marcin Koziej
>>
>>
>> GPG key: http://go.cahoots.pl/gpg/ Ϟ Twitter: @movonw
>>
>>
>>
>>  
>>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org
>> <mailto:pgsql-admin(at)postgresql(dot)org>)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-admin

Attachment Content-Type Size
backup-base text/plain 565 bytes
backup-restore text/plain 692 bytes
backup-restore-wal text/plain 526 bytes
backup-wal text/plain 439 bytes

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Julien Rouhaud 2017-10-25 18:40:48 Re: Migrate from Oracle 12g to PostgreSQL 9.3
Previous Message Samed YILDIRIM 2017-10-25 17:30:14 Re: Bad recovery: no pg_xlog/RECOVERYXLOG