Thread: Need Urgent Help in case of postgres Database Crash.

Need Urgent Help in case of postgres Database Crash.

From
"Somasekhar Bangalore"
Date:
Hi ,

I am setting up a postgres 7.3 database for a big client.I don't want to lose any data in case of database crash or
hardwarefailure . I need help in 

1. Steps needed to setup the postgres database  , is it posssible for me to write data on to two different disks. if so
how?

2. Steps needed  to recover the data in case of database crash or hardware crash.

I would appreciate if some could help me out on these issues. Thanks in advance


Somasekhar Bangalore
Principle Software Engineer

ZenSutra Software Technologies Pvt. Ltd.
Suite 601, HM Geneva House
#14, Cunningham Road
Bangalore 560-052, India


Re: Need Urgent Help in case of postgres Database Crash.

From
Sam Barnett-Cormack
Date:
On Mon, 6 Oct 2003, Somasekhar Bangalore wrote:

> Hi ,
>
> I am setting up a postgres 7.3 database for a big client.I don't want to lose any data in case of database crash or
hardwarefailure . I need help in 
>
> 1. Steps needed to setup the postgres database  , is it posssible for me to write data on to two different disks. if
sohow? 

For data redundancy, I reccomend RAID level 0 or 5 - 5 is vastly
superior, if you can afford it.

> 2. Steps needed  to recover the data in case of database crash or hardware crash.

Keep regular backups with pg_dump

--

Sam Barnett-Cormack
Software Developer                           |  Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk)  |  Lancaster University

Re: Need Urgent Help in case of postgres Database Crash.

From
Sam Barnett-Cormack
Date:
On Mon, 6 Oct 2003, Sam Barnett-Cormack wrote:

> On Mon, 6 Oct 2003, Somasekhar Bangalore wrote:
>
> > Hi ,
> >
> > I am setting up a postgres 7.3 database for a big client.I don't want to lose any data in case of database crash or
hardwarefailure . I need help in 
> >
> > 1. Steps needed to setup the postgres database  , is it posssible for me to write data on to two different disks.
ifso how? 
>
> For data redundancy, I reccomend RAID level 0 or 5 - 5 is vastly
> superior, if you can afford it.

Sorry, RAID 1 or 5 - I always get 0 and 1 confused when I use the
numbers. 0 will improve performance but won't give any redundancy.

> > 2. Steps needed  to recover the data in case of database crash or hardware crash.
>
> Keep regular backups with pg_dump
>
>

--

Sam Barnett-Cormack
Software Developer                           |  Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk)  |  Lancaster University

Re: Need Urgent Help in case of postgres Database Crash.

From
"Oliver Scheit"
Date:
> For data redundancy, I reccomend RAID level 0 or 5 - 5 is vastly
> superior, if you can afford it.

You ment RAID 1, not RAID 0

regards,
Oli

Re: Need Urgent Help in case of postgres Database Crash.

From
Bruno Wolff III
Date:
On Mon, Oct 06, 2003 at 12:28:49 +0530,
  Somasekhar Bangalore <sbangalore@zensutra.com> wrote:
> 1. Steps needed to setup the postgres database  , is it posssible for me to write data on to two different disks. if
sohow? 
>
> 2. Steps needed  to recover the data in case of database crash or hardware crash.

If the disks don't get clobbered, you can just restart the server and you
should get back all committed transactions. If you lose the disks (or
commit an undesired transaction), then you will need to go back to the point
of your last backup.

Re: Need Urgent Help in case of postgres Database Crash.

From
"scott.marlowe"
Date:
On Mon, 6 Oct 2003, Bruno Wolff III wrote:

> On Mon, Oct 06, 2003 at 12:28:49 +0530,
>   Somasekhar Bangalore <sbangalore@zensutra.com> wrote:
> > 1. Steps needed to setup the postgres database  , is it posssible for me to write data on to two different disks.
ifso how? 
> >
> > 2. Steps needed  to recover the data in case of database crash or hardware crash.
>
> If the disks don't get clobbered, you can just restart the server and you
> should get back all committed transactions. If you lose the disks (or
> commit an undesired transaction), then you will need to go back to the point
> of your last backup.

If you're using IDE drives, make sure and turn off write caching,
otherwise all bets are off as regards data integrity.  on linux it's
'hdparm -W0 /dev/hdx' where x is replaced by the drive letter of choice.