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 1gmgi1-0000SF-3R for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:14:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmghz-00015O-UC for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:14:23 +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 1gmghC-0002wc-V8 for pgsql-general@lists.postgresql.org; Thu, 24 Jan 2019 15:13:35 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmgh6-0007vJ-L8 for pgsql-general@lists.postgresql.org; Thu, 24 Jan 2019 15:13:34 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 219C95F79E; Thu, 24 Jan 2019 10:13:28 -0500 (EST) Date: Thu, 24 Jan 2019 10:13:28 -0500 From: Stephen Frost To: Ron Cc: pgsql-general@lists.postgresql.org Subject: Re: [pgbackrest] Expiring the last backup? Message-ID: <20190124151327.GO2528@tamriel.snowman.net> References: <1f2b45a1-b67e-1c41-abf6-4fc6a60c2b5d@gmail.com> <20190124132628.GL2528@tamriel.snowman.net> <2be1caa8-5a97-345b-53a6-e8de60ae4048@gmail.com> <20190124141153.GM2528@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p/UvqEySivmhi1Nt" 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 --p/UvqEySivmhi1Nt Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Ron (ronljohnsonjr@gmail.com) wrote: > On 1/24/19 8:11 AM, Stephen Frost wrote: > >* Ron (ronljohnsonjr@gmail.com) wrote: > >>On 1/24/19 7:26 AM, Stephen Frost wrote: > >>>* Ron (ronljohnsonjr@gmail.com) wrote: > >>>>The backups partition is running out of disk space, and I need to del= ete the > >>>>only backup. > >>>> > >>>>$ pgbackrest expire --stanza=3Dlocalhost --retention-full=3D0 > >>>>ERROR: [032]: '0' is out of range for 'repo1-retention-full' option > >>>Yeah, pgbackrest doesn't ever really think you want to get rid of *all* > >>>of your backups. :) > >>It's rare, but *is* occasionally needed. > >> > >>>>So, in version 2.07, what's the secret sauce for deleting that final = copy? > >>>If this is the only backup and the only cluster being backed up into > >>>that repository, you could just nuke the whole repo and recreate it wi= th > >>>stanza-create once you're ready to have backups again.. > >>That occurred to me while lying in bed.=A0 Use "stanza-delete"? > >That's another option, >=20 > What's the preferred method? Not sure that I have one.. > >though you'll have to use --force unless you're also shutting PG down. >=20 > Won't be stopping postgres!!! >=20 > Are these the steps, or am I missing something? >=20 > $ pgbackrest stop This probably isn't really necessary. > $ pgbackrest stanza-delete --stanza=3Dmystanza--force Well, you'd need a space before --force.. You'll also probably want to adjust your archive_command because otherwise it'll start failing and that would lead to WAL building up. Thanks! Stephen --p/UvqEySivmhi1Nt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcSdYXAAoJEO1sijiDR2RVyvAP/jtjGJdmTFecmj+dt0czN1P5 /DxXC3MV/CZPAyIrhdrrbzKRg2X4v8zxrNDwlyWCe6DzxHyEqjKOJ9GQnM9wkTob DAn3bsY1tYkq7Fxn8w5mW909LwgYwe3J0E8hCzg9iuuPAHL5K5KbNvn0niJKeCij +e1l2P+3b9FHAsboT90mOKhrKAn/IZE0BYlsBjccAol4xYPpdjdX+OtvKPQ/Br/M 06YkmpTO/FJcfjMgVmlfuUsFZo/12raE4NokC1+LlBRFCGG2jVXvD+PHEbQaWDAN A9wCTeKHqlSgpfAGrYzmacWCtbpcfax43VkJVHm8wIOuri5OdSemPBBJoevZv0YH rwB/VwIQ3/uNfepAUV8ZRjVkJ2Rks+L0Fip0BuF3SOa6BZl9z0DWP/a4aQT9FCNE a353YuEif3S2hBdKCzfClTEsqFdW0p6JhsBoZiLJTibkjx3N/jWCJj4phhb5P64E 794kR9Vk82PzSWiSoe0ydwdRA/KrpaWWBXENaaFJdv+88vzhtImtzW7M34eQNf/u t70ezW/IkqRhabUzeSR/mXLj/IeBqUIbUG+3KAXeQ/ufs4tT++889Nk2E4j4GYbi tdOOo6xNU8XtmHXfupRQtt4Utpy3C6LawB+gf7rUlUE2/+LXZjXR+bqkIaLYN+M9 OaHvAy/nG30Je/QSthmV =eq0M -----END PGP SIGNATURE----- --p/UvqEySivmhi1Nt--