More theoretical Database Stuff

Steve Johnson steve at bbdltd.com
Fri Oct 5 13:02:01 CDT 2001


1) Can we do tape backup in Linux in real-time with PostGreSQL

Yes, use pg_dump to do a live dump and create unix-pipeable output
which can feed tar or be pulled/pushed to another system or to the
file system and then cut to tape.  You only need to do a shutdown if
you are backing up at the file system level.

2) What do you think of the scheme above?

There is always a cost associated with recovery time.  Pay more for a
shorter recovery time (duplicated unused hardware).  Or pay even more
when the disaster hits (rush around and buy it then while the users
wait...).

But specifically;

> Server:  Linux or Solaris-Running x86's, two of them...  In the
event
> of server 1 failure, we switch over to server two, swap some
> hard drives around, restore, and re-run....

Easier than that, you can set this up to fail over automatically using
some basic linux functionality.  With the free stuff, you only lose db
connections.  Everything else fails over automagically (connections
then get re-established).  Check out the HOW-TOs.  I've read that
Postgresql can be made to handle syncing between databases, but I
haven't done it.  If you can't get it to work, then just snapshot the
data every x hours and snapshot the transaction journal every fraction
of x hours.

> (Question: Can PostGreSQL and Lunix handle this?  I think we might
> need solaris for it's transactioning file system.)

You can add transactioning file system to linux, but that probably
won't matter.  You want a transactional database, which PG is.  Adding
transactions to the file system just makes that more reliable and
allows faster recovery than fsck'ing the disks.

> My thought was that we didn't need the extra "guarentees"
> (system mirroring) if we had tape backup and raid 5,

These help make things safer, but...

> but my partner is a team leader at Meijer and insists that 1 hour
> of downtime will most more than just buying an extra system and
> mirroring it

How about 1 minute?  That's what you can get to with a fast failover
model that you can create with the free tools and similar hardware
(doesn't have to be exactly the same).  The question is, do you need
fast recover (less than 30 minutes)?  Then you need a live system.  If
you don't need that fast, then you better be ready for times measured
in days for hardware repair, system recover/re-install, database
recovery, journal recovery, and system audit.

That's my 2 cents.

sj




More information about the grand-rapids-pm-list mailing list