Re: Disaster recovery (server died) - Mailing list pgsql-general

From Madison Kelly
Subject Re: Disaster recovery (server died)
Date
Msg-id 4A3C53D1.6060204@alteeve.com
Whole thread Raw
In response to Re: Disaster recovery (server died)  (Miguel Miranda <miguel.mirandag@gmail.com>)
List pgsql-general
Miguel Miranda wrote:
> Well, i just didnt explain in detail, what i have is just the 16897
> directory where i was storing the database, i tried just copying the
> files but it didnt work,
> should it be posible to import this database is any way?
>
> the Os is Freebsd 6.2 and PG version is 8.1.3
> thank you.

I am not familiar with FreeBSD's directory structure, so if someone
pipes up, take their word over mind. However;

Your backups, what is the root directory(ies)? Ie: Did you backup
'/var/lib/postgresql', '/etc/postgres*', ?

You should be able to stop postgres, use a tool like 'rsync' to copy the
data back into place, then restart postgres. Something like:

/etc/init.d/postgresql stop
rsync -av /backup/var/lib/postgresql /var/lib/
rsync -av /backup/etc/postgres* /etc/
/etc/init.d/postgresql start

At this point, you should be golden. Not that it matters now, but why
had you not been using pg_dump to do periodic backups? How big is the
database?

lastly, depending on the value of the database, you may want to look at
hiring someone to help you. Also, make sure you are recovering to the
same versions of the OS and PostgreSQL that you old server had. This is
not the time to be doing an upgrade. :)

Madi

pgsql-general by date:

Previous
From: Miguel Miranda
Date:
Subject: Re: Disaster recovery (server died)
Next
From: Scott Marlowe
Date:
Subject: Re: Disaster recovery (server died)