Operating System - HP-UX
1758649 Members
1813 Online
108874 Solutions
New Discussion юеВ

Re: Oracle Database Online Backup

 
Jaikishan_1
Advisor

Oracle Database Online Backup

Dear Guru's,

We are using Omniback II 3.10 on HP/UX 11.0
We want support on how to Configure & take Oracle Database online backup (without shutting down the database).

Plus provide help on how to take backup of individual files backup, because Omniback allows backup of a directory.

Any kind of help is appreciated.
Thanks a lot in advance.

Regards,
Jaikishan
Don`t Give Up........
2 REPLIES 2
Brendan Newport
Frequent Advisor

Re: Oracle Database Online Backup

OmniBack comes with support for hot backups of Oracle, but there are several methods for performing this.

1) Use the EBU (Enterprise Backup Utility) for Oracle. This is an additional Oracle add-on (i.e. chargeable)It's use is documented at;


I've never used this method as I've never found a customer willing to stump-up for the EBU.

So instead I've developed a kacky hot backup script that does the same thing, albeit over the course of an evening. I have one customer with 4 Oracle instances on a server, and each one is hot backed-up once a week, and the rest of the time archived redo logs are backed-up every hour.

Basically the script identifies the structure of the database;

${SVRMGRL}< connect internal;
set termout off;
spool $DBASE_STRUCT;
select file_name,tablespace_name from sys.dba_data_files order by tablespace_name,file_name;
spool off;
exit;
EOF

and then iterates over each tablespace file, marking each tablespaces in backup mode;

SED="/usr/bin/sed -e '/selected\.$/d' -e '/^---.*--$/d' -e '/^FILE_NAME/d' $DBASE_STRUCT"

eval $SED | while read FILE TABLESPACE
do
echo "From database structure, file is $FILE and tablespace is $TABLESPACE"
${SVRMGRL}< connect internal;
alter tablespace $TABLESPACE begin backup;
exit
EOF


The iteration continues, copying the *.dbf files to a staging area, and marks the tablespaces with "end backup."

An OmniBack omnib backup routine is then called (I gzip the *.dbf files first for speed and size) for each individual *.dbf file, calling a datalist that refers to the archive filesystem/directory and looking for just *.gz files. This is the kacky bit, as each time the tape is loaded and unloaded for each tablespace file.

Finally when the iteration is complete, I back-up a copy of the control file, with a final OmniBack routine;

${SVRMGRL}<connect internal;
alter database backup controlfile to '${ARCHIVE_AREA}/${ORACLE_SID}.ctl';
exit;
EOF

(then the omnib routine)

There's a lot more error checking, and mailing of results. I'd be relunctant to send the entire script (seeing as it would be chargeable.) Restoring is a bit of a bitch, 'cos you have to identify each *.dbf file (from the control file) and then parallel restore each one. I'm writing a dtksh script at present to identify all of the files from one days hot backup, and then have them restored with the click of a buttton.

Nonetheless it does the trick. I'm still working-out a way to remove the vulnerability of losing 59 minutes of transactions if we lose the server altogether since the last archived redo log file backup was taken.

"It doesn't have to be like this. All we need to do is make sure we keep talking"(Dave Gilmour)
Andreas D. Skjervold
Honored Contributor

Re: Oracle Database Online Backup

Hello!

If using Oracle8 or higher, you'll have to use RMAN (Recovery Manager) which is shipped with Oracle.

RMAN will perform a hot backup to disk or tape, depending on what you specify in the setup.
In essence you run a script like this from RMAN:
run {
allocate channel t1 type 'sbt_tape';
backup (database);
release channel t1;
allocate channel t1 type 'sbt_tape';
sql "alter system archive log current";
backup (archivelog all delete input);
release channel t1;
}

Information on setup of RMAN:
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

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