Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUfhN-00074r-Vd for pgsql-general@arkaria.postgresql.org; Thu, 28 Dec 2017 21:26:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUfhN-0003Ca-JD for pgsql-general@arkaria.postgresql.org; Thu, 28 Dec 2017 21:26:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUfhN-0003CQ-8q for pgsql-general@lists.postgresql.org; Thu, 28 Dec 2017 21:26:45 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUfhK-0000TS-NT for pgsql-general@postgresql.org; Thu, 28 Dec 2017 21:26:44 +0000 Received: from Davids-MacBook.local (c-68-33-78-11.hsd1.md.comcast.net [68.33.78.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 2BF5F54664; Thu, 28 Dec 2017 21:26:40 +0000 (UTC) Subject: Re: PgBackRest question? To: chiru r Cc: Stephen Frost , Forums postgresql References: <20171213224505.GT4628@tamriel.snowman.net> From: David Steele Message-ID: <84f84e41-5bcd-022e-8832-376363ac3fd8@pgmasters.net> Date: Thu, 28 Dec 2017 16:26:38 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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