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 1mDODx-0005vt-UY for pgsql-general@arkaria.postgresql.org; Tue, 10 Aug 2021 09:39:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDODw-0001KH-Ej for pgsql-general@arkaria.postgresql.org; Tue, 10 Aug 2021 09:39:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDODw-0001K8-5c for pgsql-general@lists.postgresql.org; Tue, 10 Aug 2021 09:39:04 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDODt-0001CD-GF for pgsql-general@lists.postgresql.org; Tue, 10 Aug 2021 09:39:03 +0000 Received: from [188.174.62.251] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDODq-0004Ux-T4; Tue, 10 Aug 2021 11:38:58 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.16.1/8.14.9) with ESMTPS id 17A9cwr2002072 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 10 Aug 2021 11:38:58 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.16.1/8.14.9/Submit) id 17A9cvw7002071; Tue, 10 Aug 2021 11:38:57 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Tue, 10 Aug 2021 11:38:57 +0200 From: Matthias Apitz To: Adrian Klaver , pgsql-general@lists.postgresql.org Subject: Re: (13.1) pg_basebackups ./. pg_verifybackup Message-ID: Reply-To: Matthias Apitz References: <2aa0a60d-881f-2c3e-9c01-82beaef1baa0@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.62.251 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk El día martes, agosto 10, 2021 a las 09:23:34a. m. +0200, Matthias Apitz escribió: > I've studied now the fine docs again and have some additional questions. The > backup was done fine to the directory /data/postgresql133/backup-20210810-1 > which contains now: > > $ ls -l > total 717252 > -rw------- 1 postgres postgres 430331 Aug 10 08:54 backup_manifest > -rw------- 1 postgres postgres 734006592 Aug 10 08:54 base.tar.gz > -rw------- 1 postgres postgres 17667 Aug 10 08:54 pg_wal.tar.gz > > I un-tar'ed the two archives with > > $ tar xzf base.tar.gz > $ tar xzf pg_wal.tar.gz > > And then I run pg_verifybackup it gives the following errors: > > $ pg_verifybackup /data/postgresql133/backup-20210810-1 > pg_verifybackup: error: "0000000100000000000000D9" is present on disk but not in the manifest > pg_verifybackup: error: "pg_wal.tar.gz" is present on disk but not in the manifest > pg_verifybackup: error: "base.tar.gz" is present on disk but not in the manifest > pg_verifybackup: error: "archive_status/0000000100000000000000D9.done" is present on disk but not in the manifest > pg_waldump: fatal: could not find any WAL file > pg_verifybackup: error: WAL parsing failed for timeline 1 > > The two messages about the present of pg_wal.tar.gz and base.tar.gz are > clear. One could move the archives out of the sight of pg_verifybackup. > But the others are unclear to me. The files 0000000100000000000000D9 and > archive_status/0000000100000000000000D9.done are part of pg_wal.tar.gz > written by pg_basebackup: > > tar tvf pg_wal.tar.gz > -rw------- postgres/postgres 16777216 2021-08-10 08:52 0000000100000000000000D9 > -rw------- postgres/postgres 0 2021-08-10 08:54 archive_status/0000000100000000000000D9.done > > About WAL the file backup_manifest contains only: > > "WAL-Ranges": [ > { "Timeline": 1, "Start-LSN": "0/D9000028", "End-LSN": "0/D9000138" } > ], > > What is the problem here or what I've missed? > Thanks I think, I sorted it out by doing this: I moved away the tar-archives: $ cd /data/postgresql133/backup-20210810-1 $ mkdir ../saved $ mv *.tar.gz ../saved I unpacked 'base.tar.gz' the usual way: $ tar xzf ../saved/base.tar.gz but 'pg_wal.tar.gz' in the sub dir 'pg_wal': $ cd pg_wal $ tar xzf ../../saved/pg_wal.tar.gz $ cd .. $ find pg_wal pg_wal pg_wal/0000000100000000000000D9 pg_wal/archive_status pg_wal/archive_status/0000000100000000000000D9.done now pg_verifybackup seems to be happy: $ pg_verifybackup /data/postgresql133/backup-20210810-1 backup successfully verified Is this the supposed way it should work? Esp. this unpacking of 'pg_wal.tar.gz' in a directory level below? Ofc, one could specify the location of the WAL file with '-w path', but the doc only suggests this when "Try to parse WAL files stored in the specified directory, rather than in pg_wal. This may be useful if the backup is stored in a separate location from the WAL archive." But having to unpack 'pg_wal.tar.gz' below pg_wal is not obvious. matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub 27.7.1900: Kaiser Wilhelm II Deutsches Ostasiatisches Expeditionskorps, target China 02.8.2021: Deutsche Kriegsministerin Kramp-Karrenbauer Fregatte "Bayern", target China