Thread: Question about tape backup of online database.

Question about tape backup of online database.

From
"Robert B. Easter"
Date:
I'd like to know what hardware and software people use to perform tape backup
of an online database on Linux.  I would imagine the following might work(?):

1.    Use RAID mirroring of the disk the db is on onto 2 two or more other
disks.
2.    When it is time to do the backup, disconnect one of the disks from the
mirror and then dump the whole disk partition to a tape(s).
3.    Reconnect the disk back to the mirror and let it begin rebuilding.

Right now, I don't even have SCSI!  If you can tell me your setup and
backup procedure, I'd be grateful.

 --
            Robert

Re: Question about tape backup of online database.

From
Sevo Stille
Date:
"Robert B. Easter" wrote:
>
> I'd like to know what hardware and software people use to perform tape backup
> of an online database on Linux.  I would imagine the following might work(?):
>
> 1.      Use RAID mirroring of the disk the db is on onto 2 two or more other
> disks.
> 2.      When it is time to do the backup, disconnect one of the disks from the
> mirror and then dump the whole disk partition to a tape(s).

That won't do unless you take the database down for the disconnect - a
live database's file image may not be consistent over a backup. pg_dump
is the only supplied way to dump a live database.

> 3.      Reconnect the disk back to the mirror and let it begin rebuilding.
>
> Right now, I don't even have SCSI!  If you can tell me your setup and
> backup procedure, I'd be grateful.

If you do not want to take the database offline or save to a temporary
file, I'd suggest something like "mt rewind ; pg_dump -o -z >
/dev/tape". There is a new pg_dump/pg_restore out in beta now as
pg_backupXXX_latest on the PostgreSQL site which appears to be neater
than the dumper supplied in the PostgreSQL tarball.

Sevo

--
Sevo Stille
sevo@ip23.net