6

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

8

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.

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

You might find this interesting:

Forensic Analysis of Corrupted Databases (PGCon 2010)

  • 1
    Interesting. The talk starts about 5min in the audio file. – Jonas Jun 8 '11 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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