473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1783
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Bourgon | last post by:
I need to build an automated email that gives the completion messages when a database is restored (i.e. "Executed as user: sa. Executing RESTORE DATABASE DB1 FROM...
1
by: dschneiderman | last post by:
Hello All, I am not a SQL Server expert, but I have been put in a pretty precarious situtation and I am close to panicking :( I have need to restore a SQL database from backup (through...
4
by: Rich | last post by:
Hi there, I've been sent a backup file from a SQL Server 2000 DB and tried restoring into a blank DB (with the same name) on my SQL Server 2K, only it errors, see below: (I've separated each...
4
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but...
0
by: David A. Ulevitch | last post by:
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...
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
0
by: Mike | last post by:
In SQL 2000 I have been using Log Shipping to keep a warm backup copy of all my production databases in a different site. Prior to setting up my Maintenance Plan to implement log shipping, on my...
5
by: chow.justy | last post by:
Dear all, I'm a new beginner of DB2. I face 2 question during restore the data. I have 2 DB2 servers on my company. Server A is running on V7.2 and Server B is running on v8.2 (Enterprise...
5
by: smoi | last post by:
Hi all, My manager ask me to do backup for 3 database and restore them in a new server. I did the backup for the 3 database into BAK file. Then in the new server, when I did the restore in SQL...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.