Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwpjG-0008Cp-7v for pgsql-general@arkaria.postgresql.org; Thu, 21 Feb 2019 14:53:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwpjC-0005fm-Bp for pgsql-general@arkaria.postgresql.org; Thu, 21 Feb 2019 14:53:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwpjC-0005ff-2r for pgsql-general@lists.postgresql.org; Thu, 21 Feb 2019 14:53:34 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwpj5-00012U-34 for pgsql-general@lists.postgresql.org; Thu, 21 Feb 2019 14:53:33 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id E6B675F79E; Thu, 21 Feb 2019 09:53:25 -0500 (EST) Date: Thu, 21 Feb 2019 09:53:25 -0500 From: Stephen Frost To: Edson Carlos Ericksson Richter Cc: pgsql-general@lists.postgresql.org Subject: Re: Barman disaster recovery solution Message-ID: <20190221145325.GM6197@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s8GAKpHVZTOrGbze" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --s8GAKpHVZTOrGbze Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --s8GAKpHVZTOrGbze Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcbrtlAAoJEO1sijiDR2RV3EQP/3dAJkf2odTs5BMYJcktnXcD J9vj7fPeRw6mBCPIIIsAODF/Q4SLiPWepgHu2LC31wyEGnyv3troeMOSPuv21js5 u0TLebqfdQnVUQUoTJiu92XntFhwJ6VC22PyFUzw5dml3k0HHHkOYWUcdrPVS2pv h2bMRsiaRH/Y584GWcaURKswllAeEf97L1nPs7bFmlmjK21n7MKBoiFp9J9IIql/ +yis9hpg2MO5kNF9L27HoaeQeC2L9xf29+vd4ZTscg+rrVP4sw0/++9v3cXNzJTm GRUNJ2WBtSH5uSnlqOOxctm7J3fBSnLXqUs0Rxv+d+gXQ/y+tD1skUuB298A91qa mP0r4jeqkWzKJ3kQGkF6ZIV+JspkUFwvg91t11zvPsPiTCMqilCzFyQPl6PdyJFg szFTTUj3cweqjDCnA17X2zBwIAyj1MaV8c3r/RdI2Pe8nqCzwMopbYYDS/V/vPrT 6VBgrYiCTJZC9ZsCUAFtFz3u6X+Uc75RshdDGBeERWztc7wcaFtrtQqh/oR+iXLF 83x8WGud36Qi7mFJcZDW+4/FYBJsl+tAXLyDhxZ9GGjNz2DE8XB8RjdHmt0hOiRx FqJXEVPt5pdzADE/lwzHuR6+yKteboEvOt2PkK9B/pMDqYDx/LSMtfqv8Fl6HV3G kWHARct+JiWgr+TKW5xo =Tz4j -----END PGP SIGNATURE----- --s8GAKpHVZTOrGbze--