473,394 Members | 1,951 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,394 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 1785
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.