pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Edson Carlos Ericksson Richter <richter@simkorp.com.br>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Barman disaster recovery solution
Date: Thu, 21 Feb 2019 09:53:25 -0500
Message-ID: <20190221145325.GM6197@tamriel.snowman.net> (raw)
In-Reply-To: <e2fd3516-e544-ce81-512a-a7fc720eb389@simkorp.com.br>
References: <BYAPR08MB5014A1A0B2571CD69007A107AC7E0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<e2fd3516-e544-ce81-512a-a7fc720eb389@simkorp.com.br>

Greetings,

* Edson Carlos Ericksson Richter (richter@simkorp.com.br) wrote:
> No backup solution (no matter which one you choose) is 100% guaranteed: your
> disks may fail, your network mail fail, your memory may fail, files get
> corrupted - so, setup a regular "restore" to separate "test backup server"
> on daily basis. Having a virtual server for this purpose has minimal budget
> impact if any at all, and you save your sanity in case of a disaster.

While performing a straight restore is definitely good, to deal with the
in-place corruption risk of whatever your backup repository is, you really
need to do more than that.  If the middle of some index gets corrupted in
the backup, you may not notice it on the restore and even with casual use
of the restored server, which is why robust backup software really should
have a manifest of all the files in the backup and their checksums and
that should be checked on a restore.

One alternative, if your backup solution doesn't handle this for you,
and if you have page-level checksums enabled for your PG cluster (which I
strongly recommend...) would be to perform the complete restore and then
run pg_verify_checksums (or pg_checksums, depending on version) on the
restored cluster (note that you should bring the cluster up and let WAL
replay go through to at least reach consistency too...), which will
hopefully pick up on and report any latent corruption.

Note that doing something like a simple 'pg_dump' on the restored
cluster won't check the page-level checksums in indexes (or check indexes
at all), though that would provide you with a logical export of the data
that should be able to be imported into a new cluster (assuming you keep
the results of the pg_dump, that is..).

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (19+ messages)  latest in thread

Message-ID: <20190221145325.GM6197@tamriel.snowman.net>
Permalink:  ../20190221145325.GM6197@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20190221145325.GM6197@tamriel.snowman.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, richter@simkorp.com.br
  Subject: Re: Barman disaster recovery solution
  In-Reply-To: <20190221145325.GM6197@tamriel.snowman.net>
  References: <BYAPR08MB5014A1A0B2571CD69007A107AC7E0@BYAPR08MB5014.namprd08.prod.outlook.com> <e2fd3516-e544-ce81-512a-a7fc720eb389@simkorp.com.br> <20190221145325.GM6197@tamriel.snowman.net>

* 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