Re: [SQL] harddisk crash

From: "tjk(at)tksoft(dot)com" <tjk(at)tksoft(dot)com>
To: wilms(at)stud(dot)fh-hannover(dot)de (Heiko Wilms)
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] harddisk crash
Date: 1999-08-25 17:42:12
Message-ID: 199908251742.KAA02793@uno.tksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

H.W.,
The easiest way is to install a new system with the same
version of Postgres which you were running, and after you've
got the system installed, kill postres, rename it's base directory to
base.old, and move your old base directory from the crashed system
to it's place. Then restart Postgres.

If you are concerned about the integrity of the old files,
which you probably should be, dump the old tables and then
rename the base.old directory back to base and load the
data from the dump files to the new system.

You dump the old databases with "pg_dump dbname > dumpfile.txt"
I understand that pg_dumpall now works properly, so
you might be able to use that, if you have tons of databases.
You restore with "psql dbname -e < dumpfile.txt"

Troy

>
> Hi,
>
> after a harddisk crash I was only able to restore the data from the
>
> base directory. What are the steps to restore the database with these
>
> files? You all know how much work it is to build a database so I would
>
> be very thankful to any reply.
>
> --
> H. Wilms
>
> Homepage schering.si.uni-hannover.de/hugo
> email wilms(at)stud(dot)fh-hannover(dot)de
>
>
>
>
> ************
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message tjk@tksoft.com 1999-08-25 17:50:03 Re: [SQL] Dumping Oracle tables into Postgres
Previous Message Bruce Momjian 1999-08-25 17:19:43 Re: [SQL] 2 million+ entries