Re: Decreasing the data loss after failover

From: Jorge Torralba <jorge(dot)torralba(at)gmail(dot)com>
To: sinasaharkhiz <sinas1991(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Decreasing the data loss after failover
Date: 2015-06-05 21:22:54
Message-ID: CACut7uQM3dF6bwu5yduYdUN=LEeESy7YNWUMyptFKv4z_4zrSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I don't use barman and am not familiar with it. But at a very high level
assuming you are using PITR strategy, the below may help.

If your backups involve a base backup and you are archiving your WAL files
with archive_command sometime the simplest thing can get over looked.

For example, prior to restoring your base backup and applying WAL files,
did you save the original pg_xlog content? You need to restore that content
to the pg_xlog directory after the base restore. Then restore with the
command to read your archived WAL files which when complete will apply what
is in the pg_xlog directory and bring you to your latest state.

JT

On Fri, Jun 5, 2015 at 9:47 AM, sinasaharkhiz <sinas1991(at)gmail(dot)com> wrote:

> Hi,
> I use barman to backup the database of a production server of the company I
> work in. Last month a hard disk failed and I had to recover the backup from
> my barman server. But we've lost near 15 minutes of transactions, and since
> this server is responsible for the bank payments 15 minutes of lost
> transactions is too much.
> I want to know what was the problem here and how can I fix it to prevent
> this data loss next time? I think the wal files that postgresql were
> writing
> on took more than 15 minutes at the time to finish.
>
>
>
>
> --
> View this message in context:
> http://postgresql.nabble.com/Decreasing-the-data-loss-after-failover-tp5852659.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>
> --
> 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
>

--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential
information. If you are not the intended recipient, please do not print,
copy, retransmit, disseminate or otherwise use the information. Please
indicate to the sender that you have received this email in error and
delete the copy you received. Thank You.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message sinasaharkhiz 2015-06-06 00:47:44 Re: Decreasing the data loss after failover
Previous Message sinasaharkhiz 2015-06-05 16:47:40 Decreasing the data loss after failover