469,090 Members | 1,246 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

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


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
----------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
4 1633
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:

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.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2
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:

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.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #3
"David A. Ulevitch" <da****@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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #4
"David A. Ulevitch" <da****@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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by dschneiderman | last post: by
4 posts views Thread by Hardy | last post: by
5 posts views Thread by chow.justy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.