up vote 5 down vote favorite
1
share [fb]

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

link|improve this question

feedback

2 Answers

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.

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

You might find this interesting:

Forensic Analysis of Corrupted Databases (PGCon 2010)

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

Your Answer

 
or
required, but never shown

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