Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 78EB1B5D80A; Mon, 25 Jul 2011 07:51:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 37771-01; Mon, 25 Jul 2011 10:51:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by mail.postgresql.org (Postfix) with ESMTP id DFF37B5D803; Mon, 25 Jul 2011 07:51:35 -0300 (ADT) Received: from mx00.int.bfk.de ([10.119.110.2]) by mx01.bfk.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) id 1QlIl2-0006YJ-0K; Mon, 25 Jul 2011 10:51:32 +0000 Received: by bfk.de with local id 1QlIl1-0005PU-Qz; Mon, 25 Jul 2011 10:51:31 +0000 From: Florian Weimer To: Adarsh Sharma Cc: pgsql-admin@postgresql.org, pgsql-performance@postgresql.org Subject: Re: Restore database after drop command References: <4E2D0F64.2040500@orkash.com> Date: Mon, 25 Jul 2011 10:51:31 +0000 In-Reply-To: <4E2D0F64.2040500@orkash.com> (Adarsh Sharma's message of "Mon, 25 Jul 2011 12:08:28 +0530") Message-ID: <8239hueiq4.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.093 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.193 X-Spam-Level: X-Archive-Number: 201107/182 X-Sequence-Number: 37961 * Adarsh Sharma: > I restore globedatabase from a .sql file on yesterday morning.I insert > some new data in that database. > In the evening, by mistake I issued a *drop database globedatabase* comma= nd. > > Today morning, I restore again the same database from backup (.sql) file. > My .sql file have data till yesterday morning but I want newly insert > data now. Is it possible. > > Is it possible to get the data back till the state before drop > database command. It might have been possible if you had performed a hard shutdown directly after discovering the mistake, by undeleting the database files at the operating system level. This has been made more difficult (perhaps even impossible) by your subsequent write activity. --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99