Re: WAL files required to make base backup consistent

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Jerry Sievers <gsievers19(at)comcast(dot)net>
Cc: Virupaksha Kanjilal <v(dot)kanjilal(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WAL files required to make base backup consistent
Date: 2013-05-28 22:39:38
Message-ID: CAL_0b1vN3DUnKwTSovppf8-HgMxEDWTx35PHMv6WFJZahuMAPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Do you use archive_command or pg_receivexlog to archive your WAL files?

If you use archive_command, then, as Jarry has already stated, you
will have *.backup files in your WAL archive, the latest of which
points to the beginning of the WAL files set needed for the latest
base backup.

If you use pg_receivexlog, you will not have *.backup in the archive,
but could either get the starting WAL segment's name from the
backup_label file, that you can find in the root of your base backup,
or to just get all the WAL files that was modified not earlier than
the time your base backup file/directory was created.

BTW, the modification/creation time technique works for me, but I
would like to ask the community if there could be any caveats in this
case?

On Tue, May 28, 2013 at 3:03 PM, Jerry Sievers <gsievers19(at)comcast(dot)net> wrote:
> Virupaksha Kanjilal <v(dot)kanjilal(at)gmail(dot)com> writes:
>
>> Hi
>>
>> I perform a pg_basebackup with tar option and do not bring in the WAL segments created during the backup. Now I want
>> to make the backup a consistent copy and for that I need the WAL segments. How can I know which all WAL segments to
>> apply to bring the backup to a consistent state?
>
> Look in your WAL repository for files named *.backup.
>
> The prefix part will match the name of a regular WALf file from when
> the backup was started and the .backup file itself will contain some
> human readable text indicating the last WAL segment that you'll need
> for a consistent recovery.
>
> HTH
>
>> Thanks
>> Viru
>>
>
> --
> Jerry Sievers
> Postgres DBA/Development Consulting
> e: postgres(dot)consulting(at)comcast(dot)net
> p: 312.241.7800
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

Profile: http://www.linkedin.com/in/grayhemp
Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979
Skype: gray-hemp
Jabber: gray(dot)ru(at)gmail(dot)com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message aarti sawant 2013-05-30 08:49:21 Migration and snapshot of database
Previous Message Jerry Sievers 2013-05-28 22:03:41 Re: WAL files required to make base backup consistent