Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 998BC475C79 for ; Sun, 24 Feb 2002 23:26:28 -0500 (EST) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.2) with HTTP id 800432; Sun, 24 Feb 2002 20:26:29 -0800 From: "Josh Berkus" Subject: Re: help To: arun kv , PGSQL X-Mailer: CommuniGate Pro Web Mailer v.3.5.2 Date: Sun, 24 Feb 2002 20:26:29 -0800 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200202/52 X-Sequence-Number: 958 Arun, > accidently i deleted template1 directory fro /var/local/base > wihich > contains database files. what can i do now. if i reinstall will my > other > databases work without any problem. now when i try to create new > database > with CREATEDB command, it gives error that template1 dir not found. > what > best can i do now to get my databases working. > thanking you Since Postmaster seems to be running, follow these steps: 1. using pg_dump, back up all databases. 2. write down all of your database users and their passwords. 3. Back up your databases using pg_dump again, to different files. Make sure everything is there ... spot-check some of the files. Count the files and count the databases. Be very, very sure you have everything. (WARNING! If you are using a BETA version of postgresql, or version 7.1.0 or 7.0.1, pg_dump may not function perfectly and you should stop here!) 4. Delete everything in the pgsql/data/ directory. 5. Run initdb. 6. Re-create the users and CREATEDB databases that we just deleted. 7. Restore each database from the pg_dump files, as the appropriate user. ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco