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