Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDBxP-0003TS-86 for pgsql-general@arkaria.postgresql.org; Mon, 09 Aug 2021 20:33:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDBxN-0007eQ-Dq for pgsql-general@arkaria.postgresql.org; Mon, 09 Aug 2021 20:33:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDBxM-0007eI-LF for pgsql-general@lists.postgresql.org; Mon, 09 Aug 2021 20:33:09 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDBxI-0003Sc-QO for pgsql-general@lists.postgresql.org; Mon, 09 Aug 2021 20:33:07 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DC6E23200925; Mon, 9 Aug 2021 16:33:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 09 Aug 2021 16:33:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=j 9Yx5MsisIHxFff7ux9Q8e0nctGaTXHqm3eBORaTmjs=; b=lvZasCWBQGuMmZwjY AYsIIz9N3Smm8aBdzNUSnHRuz5x4xxxPpjmB4ZnZ/+XJ/9moPtM90SWaiWrjL310 BD/1kbAyYNeOycOnq5wGxl6HZo0BAJrfWlBYdolkkFwYOnHoph6r6ycDUgCWwArz GRc7oHjm7laeJWbbI+0qptfCgpg1Kaa9xNBboZOvNvl3SBzcTqDLOZktgLmdoWGJ QMpP7sLjGRfuNxqgt7ojWQ5Y/VyfOX8SmyqWBmgYu0fNTldehuvOaIPGdNaEAD28 +O2S0SXT/Ks1lsPyQ/VJXR8wKrTr2Rqhv849yKftn/8N5ZGfhjG/mrKeNgg9CViN NpjjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=j9Yx5MsisIHxFff7ux9Q8e0nctGaTXHqm3eBORaTm js=; b=QH2+HDBFGSwacspe8dEI7cgUorxjsZ3ISaXrcFamsSHfbhNw2xkCUo7OB 26Z2FH4CO3pbmAUOcFvqLgcKgP43JMWPE3PancFN2QBiMdmSedvelb61NOL1dk2m 3yxO6fvPovn23WTkGk97WmHMHxsbTUQA9eNHL1UY1ZjKvNJNRYQIFJqhC2Sj+dej 85vp/jJiv/ELvV/n2rd7n5pWDRE6AENV3hD+KC+EiNDFtjJdKSQPqk/tAgjg8rvN p2R6j2vsgf3IIKAaL5wleMQ1DjyQQCgOnDO785XzUoebHZXkLJLOvajIk6chHiHH AVQy8Yc9GIHlS0iNYoqjabmjqGi+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeejgdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepveetjedtie ekteefhffhhfetledvkeffvedugeejueekhffgvdeileeitdekvefhnecuffhomhgrihhn pehpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgt ohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Aug 2021 16:32:59 -0400 (EDT) Subject: Re: (13.1) pg_basebackups ./. pg_verifybackup To: Matthias Apitz , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <2aa0a60d-881f-2c3e-9c01-82beaef1baa0@aklaver.com> Date: Mon, 9 Aug 2021 13:32:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/9/21 1:15 PM, Matthias Apitz wrote: > Hello, > > We do backups with something like: > > $ pg_basebackup -U ${DBSUSER} -Ft -z -D ${BACKUPDIR}-${DATE}-${NUM} > > and they seems to work fine: > > $ ls -l backup-20210809-1/ > total 7656108 > -rw------- 1 postgres postgres 4191873 Aug 9 14:19 backup_manifest > -rw------- 1 postgres postgres 7835635150 Aug 9 14:19 base.tar.gz > -rw------- 1 postgres postgres 17671 Aug 9 14:19 pg_wal.tar.gz > > But, if I verify the backup with > > $ pg_verifybackup /data/postgresql13/backup-20210809-1 > > it gives thousands of error messages like > > pg_verifybackup: error: "base/1032792/1034229" is present in the manifest but not on disk > pg_verifybackup: error: "base/1076178/1101524" is present in the manifest but not on disk > > and at the end: > > pg_waldump: error: could not open directory "/data/postgresql13/backup-20210809-1/pg_wal": No such file or directory > pg_verifybackup: error: WAL parsing failed for timeline 1 > > The base files are there: > > $ find /data/postgresql13 -name 1101524 > /data/postgresql13/data/base/1076178/1101524 > > $ find /data/postgresql13 -name pg_wal > /data/postgresql13/data/pg_wal > > What we do wrong here with pg_verifybackup? Not read the docs?: https://www.postgresql.org/docs/13/app-pgverifybackup.html "pg_verifybackup is used to check the integrity of a database cluster backup taken using pg_basebackup against a backup_manifest generated by the server at the time of the backup. The backup must be stored in the "plain" format; a "tar" format backup can be checked after extracting it." > > Thanks > > matthias > -- Adrian Klaver adrian.klaver@aklaver.com