Operating System - HP-UX
1752592 Members
3158 Online
108788 Solutions
New Discussion юеВ

Re: Online Oracle Database Backup on HP-UX

 
ckchua
Occasional Advisor

Online Oracle Database Backup on HP-UX

Dear Friends,

I have a real-time application running on Oracle 8i database and HP-UX 11.0.

I would appreciate if you could suggest a online backup script to backup the Oracle Database without shuting down the database and ensure data consistancy.

regards
ckchua
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

ckchua,

You need to install OnlineJFS on your system to accomplish online backups of oracle database. The following URL clearly explains the procedure that may fulfill your need.

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=50b38cf30e9e6c89d2/screen=ckiDisplayDocument?docId=200000048194464

Hope this helps you.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

I didn't read your message completely. It really depends on what backup software you use. OmnibackII supports the snapshot filesystems. Otherwise you can use tar or cpio to take backup of the snapshot filesystems.

To write a script basically you would be doing the following

1. Create snapshot logical volumes. The number of logical volumes will be equal to the number of database file systems. You don't need to have the equal sizes. For ex.,if 70% of the file system is inactive, you can just create a file system of size 30% of the original file system.

This steps is not part of the script.


2. Create a script. This basically does the following
a. Mount the snapshot file systems using the -o snapof option for each database file system.
b. Take a tar|cpio backup. For omniback, you can make a pre_exec script just to mount snapshot file systems.
c. Once the backup is done, unmount the file systems. This will be post_exec script in omniback.

Alternatively, BMC's SQL Backtrack can also be used to take "hot backups" of oracle database.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Roger Baptiste
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

Ck,

I am no db expert, but would like to
add one basic note-
To take online oracle backup, the database should be running in archive log mode and
these archive logs should be backed up.

If this is a production box, i would
suggest to rope in a DBA in the process
or make the mgmt aware of the risks.

For an idea of the hotbackup: the process
would be somewhat on these lines:
svrmgrl </dev/null
connect internal
set termout off
spool /tmp/dbfile
select file_name,tablespace_name from sys.dba_data_files ;
spool off;
exit;
!
(this gives the list of tablespace and datafiles)

sed -e "1,2d" -e "\$d" /tmp/dbfiles | while read FILE TS
do
svrmgrl </dev/null
connect internal
alter tablespace $TS begin backup;
exit;
!
###BKUP THE FILE##
cp $FILE
##
svrmgrl < /dev/null
connect internal
alter tablespace $TS end backup;
exit;
!

This is from the DB point of view. You
would need to have a backup system in
place (drives, backup software ) to
drive the process.


-R
Take it easy.
Wodisch
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

Hello,

basically I see at least three ways to go:
1) buy something like "OmniBack II" to do the job
2) use Oracle's "RMAN" (Recovery Manager) and do it yourself - but this needs a lot of RMAN-scripting AND an RMAN-aware backup-program
3) use the "old-fashioned" way of "alter tablespace begin backup" and "alter tablespace end backup" to backup your tablespaces one by one, then followed by "alter system switch logfile" and finally a "alter system backup control file to 'FILENAME'" (or at least I do remember the commands to be that way).
It could be that this NOT supported any more with Oracle8 and Oracle8i!

HTH,
Wodisch

Your instance MUST run in "ArchiveLog" mode, anyway!
Volker Borowski
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

Hello,

the old fashioned way IS supported with version 8. Since RMAN is only inluded in the Enterprise edition, no ONLINE Backup would be possible in any other way for standard editions.
This is exactly, what SAP is using with its brbackup/brarchive/brrestore tools, and it is also the aproach, that Omniback is using with the SAP-Integration. I attached a BEGIN BACKUP script I use for Solaris 8.1.5 databases as a pre-exec-Script for omniback, where we can not use RMAN for License reasons. The END backup is similar.
It is important to ensure that all redologs created between the first BEGIN BACKUP and the last END BACKUP are available to do a consistent recovery !
I would definately recommend to involve a DBA with this problem.

The snapshot aproach has the problem, that you need to take the database offline to do the snapshot mounts, otherwise the database will not be consistent. Only for a very short time, but very offline. Beside this it is very comfortable.

Just my 0.02 ???
Volker

Deshpande Prashant
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

HI
Following link gives details about integrating Oracle online backups using RMAN with HP Omniback software.

http://ovweb.external.hp.com/lpe/doc_serv/

Thanks.
Prashant.
Take it as it comes.
Andreas D. Skjervold
Honored Contributor

Re: Online Oracle Database Backup on HP-UX

Hi

I would recommend using RMAN if you have the opportunity. Its strong coexsistence with the Oracle software gives a powerful recovery solution that can be built to your wishes. (Ouch.. that sounded almost like a Oracle advert.)
To read about RMAN I would recomend:
Oracle Metalink Note: 109223.1 Quickstart Guide: RMAN setup & Configuration
Oracle Metalink Note: 106432.1 RMAN: Setup and Usage in Oracle8 and 8i
Oracle Metalink Note: 50875.1 Getting started with Server Managed Recovery and RMAN

and here is an sample script:
rman_backup.sh:
#!/sbin/sh
# Script for running Oracle Recovery Manager backup
ORACLE_SID=TEST; export ORACLE_SID
ORACLE_HOME=/oracle/product/8.0.6; export ORACLE_HOME
$ORACLE_HOME/bin/rman target / rcvcat rman/rman@rcat \
cmdfile /oracle/admin/rman/backup_db_and_archive.scr

backup_db_and_archive.scr:
run {
allocate channel c1 type disk
format '/backup/df_%d_%s_%p';
backup (database);
release channel c1;
allocate channel c1 type disk
format '/backup/al_%d_%s_%p';
sql "alter system archive log current";
backup (archivelog all delete input);
release channel c1;
}

Sridhar mentioned SQL*Backtrack and we're using it on a couple of databases, and it's a realy good tool; but it costs some bucks..
Its meny driven setup and runnig of backups and recovery situation. Not to forget the dry-run opportunity that allows you to perform recovery without actually doing it, is a great whay to be prepared for emergency situations.

When using the Oracle Enterprise Manager the RMAN backup jobs is set up using wizards, and the need for scripting is reduced. But I would still recommend to learn the RMAN scripts for having control over recovery situations.

Andreas

Only by ignoring what everyone think is important, can you be aware of what everyone ignores!