Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Recently a database server with an important db broke (some grub linux issue that I'd prefer not to solve).

I can still access the filesystem. Is there a chance to transfer the database by only moving some directories with content to an equal machine?

This is a 32 bit ubuntu 10.04 with postgres 8.4

Edit: On ubuntu 10,04 the postgresql data directory is /var/lib/postgresql/8.4/main and not /usr/local/pgsql/data

share|improve this question

2 Answers 2

up vote 7 down vote accepted

I think backing up the "data directory" is what you want.

Moving the whole directory to a new server should be what you might look into. This will move everything within the cluster. From there, you can drop, move,... your single databases as you need to.

share|improve this answer
3  
@mit: Note this will move the whole cluster rather than just the one database - you can do this to an intermediate server and then dump/restore if you only want one database –  Jack Douglas Jun 8 '11 at 9:40
    
@Jack I added it to the answer. Good info! –  DrColossos Jun 8 '11 at 18:03

You might find this interesting:

Forensic Analysis of Corrupted Databases (PGCon 2010)

share|improve this answer
1  
Interesting. The talk starts about 5min in the audio file. –  Jonas Jun 8 '11 at 10:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.