From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Matthias Apitz <guru@unixarea.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: (13.1) pg_basebackups ./. pg_verifybackup
Date: Mon, 9 Aug 2021 13:32:58 -0700
Message-ID: <2aa0a60d-881f-2c3e-9c01-82beaef1baa0@aklaver.com> (raw)
In-Reply-To: <YRGMyLtdVS2jRlWd@c720-r368166>
References: <YRGMyLtdVS2jRlWd@c720-r368166>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, guru@unixarea.de
Subject: Re: (13.1) pg_basebackups ./. pg_verifybackup
In-Reply-To: <2aa0a60d-881f-2c3e-9c01-82beaef1baa0@aklaver.com>
References: <YRGMyLtdVS2jRlWd@c720-r368166> <2aa0a60d-881f-2c3e-9c01-82beaef1baa0@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox