Re: Disaster recovery (server died)

From: Madison Kelly <linux(at)alteeve(dot)com>
To: Miguel Miranda <miguel(dot)mirandag(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Disaster recovery (server died)
Date: 2009-06-20 03:13:21
Message-ID: 4A3C53D1.6060204@alteeve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-06-20 03:29:51 Re: Disaster recovery (server died)
Previous Message Miguel Miranda 2009-06-20 02:43:34 Re: Disaster recovery (server died)