pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: arun kv <arun@library.iisc.ernet.in>
To: PGSQL <pgsql-php@postgresql.org>
Subject: Re: help
Date: Sun, 24 Feb 2002 20:26:29 -0800
Message-ID: <web-800432@davinci.ethosmedia.com> (raw)
In-Reply-To: <Pine.BSO.4.21.0202181411320.10932-100000@library.iisc.ernet.in>

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



view thread (16+ messages)  latest in thread

Message-ID: <web-800432@davinci.ethosmedia.com>
Permalink:  ../web-800432@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-800432@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: josh@agliodbs.com, arun@library.iisc.ernet.in
  Subject: Re: help
  In-Reply-To: <web-800432@davinci.ethosmedia.com>
  References: <Pine.BSO.4.21.0202181411320.10932-100000@library.iisc.ernet.in> <web-800432@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox