Re: PgBackRest question? - Mailing list pgsql-general

From chiru r
Subject Re: PgBackRest question?
Date
Msg-id CA+RSxMi8QQShEj0bNqiQyZs0Tadiwx1=kMmEsb989ykTgCer_g@mail.gmail.com
Whole thread Raw
In response to Re: PgBackRest question?  (David Steele <david@pgmasters.net>)
Responses Re: PgBackRest question?
List 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@pgmasters.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@pgmasters.net

pgsql-general by date:

Previous
From: David Steele
Date:
Subject: Re: PgBackRest question?
Next
From: David Steele
Date:
Subject: Re: PgBackRest question?