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 1hQhTf-0005Ft-Cw for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 00:08:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQhTe-0000fz-2g for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 00:08:58 +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 1hQhTd-0000fs-Pj for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 00:08:57 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQhTa-0003jQ-PF for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 00:08:57 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id F33F35F79F; Tue, 14 May 2019 20:08:51 -0400 (EDT) Date: Tue, 14 May 2019 20:08:51 -0400 From: Stephen Frost To: Rich Shepard Cc: pgsql-general@lists.postgresql.org Subject: Re: Table update: restore or replace? Message-ID: <20190515000851.GD6197@tamriel.snowman.net> References: <5fb66fe3-0aa0-3d6d-db53-172a6c3f1a30@aklaver.com> <28923.1557868239@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2RkIREfMRuLQ8CtT" 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 --2RkIREfMRuLQ8CtT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Rich Shepard (rshepard@appl-ecosys.com) wrote: > That's why I thought of copying the entire data/ directory. That isn't going to work because things change in the data directory... > >Also, I don't know what method you've been using to make file-level > >backups, but they're really pretty worthless unless you (a) stop the > >server or (b) use a filesystem snapshot. Otherwise you're very likely to > >have inconsistent data. >=20 > I run dirvish which runs each night starting at > 00:30 am when there's no activity (by me, at least) on the database. The database system is potentially doing things though, so this isn't a backup solution that is reliable. You really should be using a backup solution that's been specifically written to work with PostgreSQL. I wouldn't trust performing a restore from a backup taken like this. I'd suggest you restore to a new server (or another directory, at least...) and try starting up PG and then dump out the table and then check that it's valid. And then switch to a backup system that actually works with PG. Thanks, Stephen --2RkIREfMRuLQ8CtT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJc21iTAAoJEO1sijiDR2RVg4IQAMDCDjcG/IO/cwvykEUpTn9A HSIwosCVHTqik0zdxxpr+n1iHw1urLrAqxUzhrL9Kqg1kOrfV1oNh2NU3iSfHsNt gWylw9x3/Ox3c/e+HEZnXCHAAm6GpF/vbLrAasU3cYycB1cZQeTtyAERNISzQiwu ZACsVKuBkzGSiekmZddMq6/ouowEPE1KaryI862j3MiYGZFDbxx4SuATiabKhe2U pb7LbAKyKalnPKLFfCerbwjxnEm5rUBlDrAgJ8eOL5TNsZDDBAQJ2zGL86k9DAi/ hlZ5UEIwZCD2ii5tpuzjlhQ1hglhRguMun4tBxY15WJWK+bE1SLoZZEaN6AxhPed IAmBaT2gUN/K5aOXbu565kqBopDlWhVIRqidXKP6ONa7mUgfDJXx0HvgfpOYXbLB 0ip3Pagpwoh/BVCUsOYpgiAG6CBVvi6pxo+VQ95z/nE/nhBKjqsUhZWHhfMKGAYk JnLx7+gtffDeHkky2Yuwj2bVpgzYdHxMDYMB7Vlk2lldmo2PfvnitEXzYF/wpd7s z8wf49+4oQhv4rDZB/eShP0r21wnnPa+MlIWxptTgG6DBQ6gIJosOmajPmTxoKyD PLuF1kJFJ/lkN5PG0l+lwbH3kuHj/UN4poQV7rjxal/R4OVEXjmenLDH1ExV2lG0 g/VD/AoD71+YAtg49Yk2 =opie -----END PGP SIGNATURE----- --2RkIREfMRuLQ8CtT--