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