Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePTfc-0007zv-8e for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Dec 2017 13:35:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePTfa-0004Wk-Gm for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Dec 2017 13:35:26 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ePTfa-0004Wa-B8 for pgsql-bugs@lists.postgresql.org; Thu, 14 Dec 2017 13:35:26 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ePTfT-0004lC-CX for pgsql-bugs@postgresql.org; Thu, 14 Dec 2017 13:35:25 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A175E5F795; Thu, 14 Dec 2017 08:35:17 -0500 (EST) Date: Thu, 14 Dec 2017 08:35:17 -0500 From: Stephen Frost To: Alvaro Herrera Cc: Raghavendra Rao J S V , Francisco Olarte , Sergei Kornilov , "David G. Johnston" , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14963: Number of wal files are keep on increasing Message-ID: <20171214133517.GW4628@tamriel.snowman.net> References: <20171214104815.ldrhdbq6vxfevx7h@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lCdfb/qvuOjQZzH7" Content-Disposition: inline In-Reply-To: <20171214104815.ldrhdbq6vxfevx7h@alvherre.pgsql> User-Agent: Mutt/1.5.21 (2010-09-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --lCdfb/qvuOjQZzH7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alvaro, Raghavendra, * Alvaro Herrera (alvherre@alvh.no-ip.org) wrote: > Raghavendra Rao J S V wrote: > > We are taking the backup of database everyday using pg_basebackup utili= ty. We > > have implemented a pg_basebackup utility through shell script.This will= be > > invoked everyday at 2AM and takes the backup of database. >=20 > This is a bad idea. If you don't have a very firm grasp of how to write > a backup system, it's better not to write it yourself, because there are > many possible errors you can make that can lead you to end up with > backups that look ok but are actually invalid. Using pg_basebackup is *not* a bad idea, it's a good tool and works just fine if used properly for a lot of environments. The biggest concern with pg_basebackup is making sure that the WAL is streamed with the backup and kept (using --xlog-method=3Dstream) and that you're checking the results of the command to make sure it didn't error out. Of course, with any backup solution, it's essential that backups be fully restored and tested to make sure that they work. There are certainly other tools out there for doing backups of PG with their own pros and cons and while I wouldn't recommend that people try to write their own backup software, using pg_basebackup isn't bad and we shouldn't be telling people that. Thanks! Stephen --lCdfb/qvuOjQZzH7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaMn4VAAoJEO1sijiDR2RV3G8P/joGkQBdyiUo+RuDipJ9gpQU r5IWaacgIhRZf+yZHIx6mpLmOabdv1UrudD+dFU+F5n8qFkt9CHkOWJ4jfjlKeBo CMpLSbFXqBmWOmamVjkXlXAI7pBxAcFXSW0w2vPPIstThBaYWcEY2Lqvw0s7ljNJ Chwf4TkTxhapn4y1C0Jxryt5C5mkdosnxqVJ6AsSid/jTjHifjiUZyL7MjJW00Xn sUKB91259WV11Uoejsgt3Ep6LPUWJ/LmbBcbvHTNHX8mrWzNeq9n+Yr5rO1dLkwL 5RLjKpUnZZFK+E4wTghhZqzoPFp+JzMlqoA6fqJiC3d9fwrqlLg/Gi1BRuR1n+QC A+a9jgUoayJxTwNK3ZEyB+JCzUR26U7ACVinMQmf9IprBmaOJ0fodyp9ljnuuVbM kwyk2PDc9TSjEPVtxE4j9hC7so3jOPKJ686r5t5Z+2foueefIhmCMNfskltj1Q9u 854LOyvVI4T7E/VNKNsU69dUNGjEx1N5g5VcKdx9cPm82fhQJ3fGQXj0ZzzHmLTS TUlk39KX1qfqDIv6VWuJUz9Pc02NPQa45dnNg89NWlgxT0UAVYzLYRBKkmZIOBAL CKc4eF7pZs5e0By9EwrAWsfhnI/BX3vxuv3JPu+AIefVHMlhBypwHHQ6Ji+nX+8h 5iM76p4rM9CIekgUaAkW =7w10 -----END PGP SIGNATURE----- --lCdfb/qvuOjQZzH7--