Re: pg_basebackup Restore problem

From: Johnathan Tiamoh <johnathantiamoh(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup Restore problem
Date: 2024-01-17 20:27:08
Message-ID: CACoPQdY9-y22X0NZZf9x949U9k+k2ypGDC8DqZt6OwebB8GHvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

1. What's in $PATH_FOLDER?

/tnt/backup/current

2. What pg_basebackup command did you use?

pg_basebackup -D "$baseback_dir" --format=tar \
"${comp_opts[(at)]}" --wal-method=stream --no-password
--verbose "${PG_DUMP_OPTS[(at)]}"

/bin/mv "$baseback_dir"/* "/enf/backup/current/"
/bin/rm -r "$baseback_dir"

3. Why aren't you letting pg_basebackup maintain the WAL files it needs?

On Wed, Jan 17, 2024 at 11:46 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
wrote:

> 1. What's in $PATH_FOLDER?
> 2. What pg_basebackup command did you use?
> 3. Why aren't you letting pg_basebackup maintain the WAL files it needs?
>
> On Wed, Jan 17, 2024 at 11:27 AM Johnathan Tiamoh <
> johnathantiamoh(at)gmail(dot)com> wrote:
>
>> You need to tell us the PG version number *and* show us the full command
>> you ran. ?
>>
>> Postgresql Version 14.10
>>
>> tar -h -zxvf $PATH_FOLDER/* .tar.gz
>>
>> ls $PATH_FOLDER/*.tar.gz | xargs -I {} tar -h -zxvf {}
>>
>> What user are you running pg_basebackup as?
>>
>> I ran it as postgres and now I'm restoring as postgres
>>
>> /tnt??? Or /mnt?
>> /tnt/backup/current
>>
>> This is where the backup files are.
>>
>>
>>
>>
>>
>> On Wed, Jan 17, 2024 at 11:15 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
>> wrote:
>>
>>> On Wed, Jan 17, 2024 at 11:11 AM Johnathan Tiamoh <
>>> johnathantiamoh(at)gmail(dot)com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am trying to restore a pg_basebackup and have the following errors.
>>>>
>>>>
>>> You need to tell us the PG version number *and* show us the full
>>> command you ran.
>>>
>>>
>>>> nohup: ignoring input
>>>> tar: /tnt/backup/current/7400.tar.gz: Not found in archive
>>>>
>>> tar: /tnt/backup/current/7401.tar.gz: Not found in archive
>>>> tar: /tnt/backup/current/7402.tar.gz: Not found in archive
>>>> tar: /tnt/backup/current/base.tar.gz: Not found in archive
>>>> tar: /tnt/backup/current/pg_wal.tar.gz: Not found in archive
>>>> tar: Exiting with failure status due to previous errors
>>>> PG_14_202107181/
>>>> tar: PG_14_202107181: Cannot mkdir: Permission denied
>>>>
>>>
>>> What user are you running pg_basebackup as?
>>>
>>>
>>>> PG_14_202107181/137502/
>>>> tar: PG_14_202107181: Cannot mkdir: Permission denied
>>>> tar: PG_14_202107181/137502: Cannot mkdir: No such file or directory
>>>> PG_14_202107181/137502/3222926016
>>>> tar: PG_14_202107181: Cannot mkdir: Permission denied
>>>>
>>>> The files exist in the specified directory.
>>>>
>>>
>>> /tnt??? Or /mnt?
>>>
>>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Wienhold 2024-01-17 20:41:45 Re: unbale to list schema
Previous Message Sasmit Utkarsh 2024-01-17 19:14:40 Re: Help needed for the resolution of memory leak