trying to restore after a server failure...need some help

Started by David A. Ulevitchalmost 22 years ago3 messagesgeneral
Jump to latest
#1David A. Ulevitch
davidu@everydns.net

Hi fellow pgsql users,

I am helping my university's student union get back up and running after
some major server issues they had. They had serious disk issues on a
server, but not on the /var partition where all of the
/var/lib/postgres/data files were. I was able to recover all of it, at
the file-system level.

The old machine and the new machine were both running Debian Linux
3.0-stable and postgresql 7.2.1-2woody4.

I did the normal debian binary install of postgresql-server and copies
everything from the old server's /var/lib/postgres to the new
/var/lib/postgres. I then copied everything from /etc/postgresql from the
old server to the new server too. (/etc was also fine in the crash) After
chown'ing all the files to `chown -R postgres.postgres /var/lib/postgres`
I tried to login.

Here's the weird part:
root@sulinux:/var/lib/postgres# psql -U spark spark_db
Password:
Welcome to psql, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

spark_db=> \l
List of databases
Name | Owner | Encoding
-----------+-------+-----------
template0 | | SQL_ASCII
template1 | | SQL_ASCII
(2 rows)

spark_db=> create database spark_db;
ERROR: CREATE DATABASE: database "spark_db" already exists
spark_db=>

It seems like the data is sort of there but not really. The login account
works and it thinks spark_db exists but I can't query the tables or
anything...

Sadly, there are no other backups of this data other than what I recovered
from the old server.

What can we do from here? Are there any experts we can consult?

Thanks,
David A. Ulevitch

----------------------------------------------------
David A. Ulevitch - Founder, EveryDNS.Net
Washington University in St. Louis
http://david.ulevitch.com -- http://everydns.net
----------------------------------------------------

#2Lincoln Yeoh
lyeoh@pop.jaring.my
In reply to: David A. Ulevitch (#1)
Re: trying to restore after a server failure...need

I've no suggestions, except that I hope you still have a copy of the
original /var/lib/postgres/data files and didn't run postgresql on your
only copy...

At 12:19 PM 4/29/2004 -0500, David A. Ulevitch wrote:

Show quoted text

Hi fellow pgsql users,

I am helping my university's student union get back up and running after
some major server issues they had. They had serious disk issues on a
server, but not on the /var partition where all of the
/var/lib/postgres/data files were. I was able to recover all of it, at
the file-system level.

The old machine and the new machine were both running Debian Linux
3.0-stable and postgresql 7.2.1-2woody4.

I did the normal debian binary install of postgresql-server and copies
everything from the old server's /var/lib/postgres to the new
/var/lib/postgres. I then copied everything from /etc/postgresql from the
old server to the new server too. (/etc was also fine in the crash) After
chown'ing all the files to `chown -R postgres.postgres /var/lib/postgres`
I tried to login.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: David A. Ulevitch (#1)
Re: trying to restore after a server failure...need some help

"David A. Ulevitch" <davidu@everydns.net> writes:

I did the normal debian binary install of postgresql-server and copies
everything from the old server's /var/lib/postgres to the new
/var/lib/postgres. I then copied everything from /etc/postgresql from the
old server to the new server too. (/etc was also fine in the crash) After
chown'ing all the files to `chown -R postgres.postgres /var/lib/postgres`
I tried to login.

Uh, was the new machine's postmaster running while you did all this?
You would certainly want the postmaster down while you overwrite
/var/lib/postgres ...

regards, tom lane