Discussion:
using xfs_dump to backup an Oracle DB in hot backup mode.
Austin Gonyou
2002-09-25 21:27:37 UTC
Permalink
Anyone have an order of operation for something like this?

I was thinking, that while oracle is in hot_backup mode, I would just be
able to do xfs_dump /dev/sdb /dev/sdaa or some such thing, until all
volumes are done.

If I don't use xfs_freeze though, is that a good copy?

I'm a bit confused at this point, and wanted to ask the community. TIA
--
Austin Gonyou <***@coremetrics.com>
Coremetrics, Inc.
Steve Lord
2002-09-25 21:46:13 UTC
Permalink
Post by Austin Gonyou
Anyone have an order of operation for something like this?
I was thinking, that while oracle is in hot_backup mode, I would just be
able to do xfs_dump /dev/sdb /dev/sdaa or some such thing, until all
volumes are done.
If I don't use xfs_freeze though, is that a good copy?
I'm a bit confused at this point, and wanted to ask the community. TIA
freeze and xfsdump are totally different beasts. freeze gives you
a stable image on disk, including all data and metadata from the
buffer cache at the time. Once frozen you need some other mechanism
to take a copy of the disk image.

xfsdump is going to do a file based backup. I cannot speak for
the best point in time to do this to an oracle setup.

Steve
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: ***@sgi.com
Derek Glidden
2002-09-25 22:19:54 UTC
Permalink
Post by Austin Gonyou
Anyone have an order of operation for something like this?
I was thinking, that while oracle is in hot_backup mode, I would just be
able to do xfs_dump /dev/sdb /dev/sdaa or some such thing, until all
volumes are done.
If I don't use xfs_freeze though, is that a good copy?
I'm a bit confused at this point, and wanted to ask the community. TIA
[grrr... stupid broken "reply" on email client. ALSO sending reply to
list for anyone else who may like to know]

I think as long as your Oracle is in the proper state, the filesystem is
kind of irrelevant. xfsdump, I assume, sees what the OS sees as the
current state of the file, so you just have whatever race conditions the
application may place on any file you're backing up and not worry about
whether the file on the filesystem is "consistent" because from the
perspective of the VFS it is. Oracle specifically handles hot-backups
to prevent any race conditions during backup, so there's no trouble
there either.

You will need to have your Oracle in ARCHIVELOG mode so full redo logs
get archived rather than recycled. (Oracle won't let you put it into a
hot backup mode without being in ARCHIVELOG mode anyway.) ALTER each
TABLESPACE you wish to back up as BEGIN BACKUP, which causes Oracle to
stop flushing transactions to the datafiles and just store/archive them
in the transaction log files thereby leaving your datafiles in a
consistent state by not performing any writes to them during the
backup. Backup your Oracle datafiles. ALTER each TABLESPACE END BACKUP
to make Oracle flush pending transactions back to the datafiles which
starts writing to the datafiles again. Then backup your redo logfiles
and archived redo logs.

Hopefully your redo logs, archived redo logs and datafiles are on
different partitions so xfsdump can archive them separately. (Generally
they're at least on different spindles for performance reasons.)

The only place you may run into problems is with the redo logs since
there is no point at which Oracle may not be writing to those files or
have outstanding writes to those files that have not been written by the
application. Once a transaction (redo) log has filled up, it is
archived and recycled, and you can safely back up the archived logfiles
without fear of writes to the file while being backed up.

Does that help at all?
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#!/usr/bin/perl -w
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map
{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;
$t^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)
[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h=5;$_=unxb24,join
"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d=
unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d
Post by Austin Gonyou
12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*
8^$q<<6))<<9,$_=$t[$_]^(($h>>=8)+=$f+(~$g&$t))***@a[128..$#a]}
print+x"C*",@a}';s/x/pack+/g;eval

usage: qrpff 153 2 8 105 225 < /mnt/dvd/VOB_FILENAME \
| extract_mpeg2 | mpeg2dec -

http://www.cs.cmu.edu/~dst/DeCSS/Gallery/
http://www.eff.org/ http://www.anti-dmca.org/
Greg Freemyer
2002-09-25 22:59:47 UTC
Permalink
Post by Austin Gonyou
Anyone have an order of operation for something like this?
I was thinking, that while oracle is in hot_backup mode, I would just be
able to do xfs_dump /dev/sdb /dev/sdaa or some such thing, until all
volumes are done.
If I don't use xfs_freeze though, is that a good copy?
I'm a bit confused at this point, and wanted to ask the community. TIA
I thought Oracle's hot_backup was specifically designed to work with snapshots.

I.e. freeze Oracle --> xfs_freeze --> create snapshot --> unfreeze xfs --> unfreeze Oracle

If you are going to have it in that mode for the entire duration of your backup, you may have problems. In particular, I don't think the write buffers are all that huge.

Even worse, if you go into hot_backup for an hour or so, and you have a machine crash during this time, your new data is lost!!!!

If you do want to try to go disk to disk extremely rapidly, you will need to either not use xfs_freeze, on mount your drive with -noatime.

Greg Freemyer
Internet Engineer
Deployment and Integration Specialist
Compaq ASE - Tru64 v4, v5
Compaq Master ASE - SAN Architect
The Norcross Group
www.NorcrossGroup.com
Austin Gonyou
2002-09-26 16:17:05 UTC
Permalink
Post by Austin Gonyou
Post by Austin Gonyou
Anyone have an order of operation for something like this?
I was thinking, that while oracle is in hot_backup mode, I would
just be
Post by Austin Gonyou
able to do xfs_dump /dev/sdb /dev/sdaa or some such thing, until
all
Post by Austin Gonyou
volumes are done.
If I don't use xfs_freeze though, is that a good copy?
I'm a bit confused at this point, and wanted to ask the
community. TIA
I thought Oracle's hot_backup was specifically designed to work with snapshots.
I.e. freeze Oracle --> xfs_freeze --> create snapshot --> unfreeze
xfs --> unfreeze Oracle
If you are going to have it in that mode for the entire duration of
your backup, you may have problems. In particular, I don't think the
write buffers are all that huge.
So the operation described above can be done in a relatively short
period of time yes? If so, then xfs_freeze won't have to be on long as
the snapshot would appear as though it were still frozen.
Post by Austin Gonyou
Even worse, if you go into hot_backup for an hour or so, and you have
a machine crash during this time, your new data is lost!!!!
I assume you're speaking to the snapshot? I think this is the part that
confuses me the most.
Post by Austin Gonyou
If you do want to try to go disk to disk extremely rapidly, you will
need to either not use xfs_freeze, on mount your drive with -noatime.
We already mount with noatime, IOzone tests show it's much faster and
more consistent to do so. Disk-Disk backup would be ideal in our
situation, then it preserves the BCV like operation, which is really
what I'm trying to find out how to do, if I can, with XFS utilities.
Post by Austin Gonyou
Greg Freemyer
Internet Engineer
Deployment and Integration Specialist
Compaq ASE - Tru64 v4, v5
Compaq Master ASE - SAN Architect
The Norcross Group
www.NorcrossGroup.com
--
Austin Gonyou <***@coremetrics.com>
Coremetrics, Inc.
Loading...