Re: PgBackRest question?

From: chiru r <chirupg(at)gmail(dot)com>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: PgBackRest question?
Date: 2017-12-28 22:15:02
Message-ID: CA+RSxMi8QQShEj0bNqiQyZs0Tadiwx1=kMmEsb989ykTgCer_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please find the below details.

postgres=# select datname, oid from pg_database;
datname | oid
-----------+--------
template0 | 13289
postgres | 13294
template1 | 1
db1 | 770161
db2 | 770162
db3 | 770169
(6 rows)

On Thu, Dec 28, 2017 at 4:26 PM, David Steele <david(at)pgmasters(dot)net> wrote:

> On 12/28/17 3:38 PM, chiru r wrote:
>
>> Thank you for the details David and Stephen..
>>
>> I am unable to recover the database which associated with user table
>> space .
>>
>> Please see the below test case and suggest me,if any one has the issues
>> while recovering single database.
>>
>> *Test case: *
>>
>> 1) created tablespace tblsp1 .
>> 2) created database db1 with tablespace tblsp1;
>> 3) created another database db2 ( with out tablespace , it means it is
>> going to be created under pg_default table space)
>> 4) Taken full backup.
>> 5) create table t1 on both db1 and db2 databases .
>> 6) Taken Incremental backup
>> 7) a) We have tried to restore the db1 on different location by
>> mapping table-space and without table-space .
>>
>
> This all looks reasonable.
>
> However we got the below Error
>> pgbackrest --stanza=online_backups --db-include=db1
>> --tablespace-map-all=/u02/pgdata02/report2 restore
>> ERROR [080]: : database to include 'db1' does not exist
>>
>
> It appears that db1 is not listed as a valid database in the backup
> manifest.
>
> b) We have tried to restore the db1 on different location and we got the
>> below Error
>>
>> pgbackrest --stanza=online_backups --delta --db-include=db1 restore
>> ERROR [080]: : database to include 'db1' does not exist
>>
>> Please help me can we restore single database ,if it is assigned with
>> tables space? .
>> And also let me know if anything missing in my test case ?
>>
>> *Note *: if I restore the db2, whicich is associated with pg_default
>> tablespace it is working.
>> pgbackrest --stanza=online_backups --delta --db-include=db2 restore
>>
>
> Can you run this query on the cluster where the backups are running and
> attach the result:
>
> select datname, oid from pg_database;
>
> Thanks,
> --
> -David
> david(at)pgmasters(dot)net
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Steele 2017-12-28 22:41:03 Re: PgBackRest question?
Previous Message David Steele 2017-12-28 21:26:38 Re: PgBackRest question?