pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <ian.barwick@2ndquadrant.com>
To: rajan <vgmonnet@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: WAL restoration is not happening completely
Date: Mon, 14 Nov 2016 22:24:12 +0900
Message-ID: <6c88ca7e-3ebc-993d-3f9d-7309a077ccc8@2ndquadrant.com> (raw)
In-Reply-To: <1479116970057-5930204.post@n3.nabble.com>
References: <1479116970057-5930204.post@n3.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi

On 11/14/2016 06:49 PM, rajan wrote:
> Hi,
>
> In postgresql.conf file we have set the following configuration,
> wal_level=hot_standby
> archive_mode=on
> archive_command='test ! -f /archives/%f && cp %p /archives/%f'
> max_wal_senders=1
> wal_keep_segments=128
>
> and took a base backup using the command, pg_basebackup --xlog --format=t -D
> /backups/`date +%Y%m%d`
>
> This base backup and WAL files from the '/archives' dir are moved to another
> machine in which the base.rar is extracted into $PGDATA folder and WAL
> files(9 files) are copied to '/archives' folder.
>
> recovery.conf is created under the $PGDATA folder with the command
> "restore_command = 'cp /archives/%f %p'" and then the postgres db service is
> started.
>
> *The restored database has changes which were done today and missing data
> from changes did a couple of days before.*

Are you absolutely sure about this? All changes present in the archived
WAL *will* be replayed sequentially; it's not possible that an arbitrary
subset of changes will be left out.

Which PostgreSQL version are you using, and what are the exact contents
of the recovery.conf file?

For working with backups and WAL archiving I suggest you take a look
at "Barman" ( http://www.pgbarman.org/ ).


Regards

Ian Barwick


-- 
  Ian Barwick                   http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (6+ messages)  latest in thread

Message-ID: <6c88ca7e-3ebc-993d-3f9d-7309a077ccc8@2ndquadrant.com>
Permalink:  ../6c88ca7e-3ebc-993d-3f9d-7309a077ccc8@2ndquadrant.com/
Also on:    postgresql.org/message-id/6c88ca7e-3ebc-993d-3f9d-7309a077ccc8@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ian.barwick@2ndquadrant.com, vgmonnet@gmail.com
  Subject: Re: WAL restoration is not happening completely
  In-Reply-To: <6c88ca7e-3ebc-993d-3f9d-7309a077ccc8@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox