Re: (13.1) pg_basebackups ./. pg_verifybackup

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Matthias Apitz <guru(at)unixarea(dot)de>, Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: (13.1) pg_basebackups ./. pg_verifybackup
Date: 2021-08-11 22:47:57
Message-ID: b0875454-8a52-6200-0b5b-91cf35d4c08e@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/11/21 1:18 PM, Matthias Apitz wrote:
> El día jueves, agosto 12, 2021 a las 12:47:32a. m. +0530, Vijaykumar Jain escribió:
>
>>>
>>>
>>> Could some kind sol acknowledge me that this is the correct procedure to
>>> use pg_verifybackup? Thanks in advance
>>>
>>>
>> ...
>>
>> postgres(at)db:~/playground/demo/basebackup$ tar xzf base.tar.gz
>> postgres(at)db:~/playground/demo/basebackup$ cd pg_wal/
>> postgres(at)db:~/playground/demo/basebackup/pg_wal$ mv ../pg_wal.tar.gz .
>> # pg_wal.tar.gz file has to uncompressed in pg_wal dir
>> postgres(at)db:~/playground/demo/basebackup/pg_wal$ tar xzf pg_wal.tar.gz
>> ...
>
> This is exactly the point of my question (and I figured it out too):
> Where is this explained that «pg_wal.tar.gz file has to uncompressed in
> pg_wal dir»?

Nowhere, because it doesn't per:

https://www.postgresql.org/docs/13/app-pgverifybackup.html

-w path
--wal-directory=path

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.

Along with other options for shaping the verification:

-i path
--ignore=path

Ignore the specified file or directory, which should be expressed
as a relative path name, when comparing the list of data files actually
present in the backup to those listed in the backup_manifest file. If a
directory is specified, this option affects the entire subtree rooted at
that location. Complaints about extra files, missing files, file size
differences, or checksum mismatches will be suppressed if the relative
path name matches the specified path name. This option can be specified
multiple times.
-m path
--manifest-path=path

Use the manifest file at the specified path, rather than one
located in the root of the backup directory.
-n
--no-parse-wal

Don't attempt to parse write-ahead log data that will be needed to
recover from this backup.

>
> Or, wouldn't it even be better that the files in
> pg_wal.tar.gz would have the dir pg_wal in front?
>
> matthias
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Harris 2021-08-12 01:06:55 ERROR: invalid memory alloc request size when committing transaction
Previous Message Vijaykumar Jain 2021-08-11 21:19:35 Re: (13.1) pg_basebackups ./. pg_verifybackup