Re: help

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: arun kv <arun(at)library(dot)iisc(dot)ernet(dot)in>, PGSQL <pgsql-php(at)postgresql(dot)org>
Subject: Re: help
Date: 2002-02-25 04:26:29
Message-ID: web-800432@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

  • help at 2002-02-18 08:44:39 from arun kv

Browse pgsql-php by date

  From Date Subject
Next Message Gary Hoffman 2002-02-26 05:22:26 Many instances of postmaster
Previous Message Chris 2002-02-24 22:08:38 Re: Debugging PG 7.2 installation