Operating System - HP-UX
1751800 Members
5430 Online
108781 Solutions
New Discussion юеВ

Re: how can I backup database into tape device in Oracle

 
SOLVED
Go to solution
songgh
New Member

how can I backup database into tape device in Oracle

In oracle system can i select methods of backup,such as tape device,disk or CDW?
And how to backup database into tape device?
8 REPLIES 8
Alexander M. Ermes
Honored Contributor

Re: how can I backup database into tape device in Oracle

Hi there.
You can try a cpio backup of all necessary files.
I attached a sample.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Alexander M. Ermes
Honored Contributor
Solution

Re: how can I backup database into tape device in Oracle

Hi there.
You can try a cpio backup of all necessary files.
I attached a sample.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Andreas D. Skjervold
Honored Contributor

Re: how can I backup database into tape device in Oracle

Hi
To backup a database you'll use Oracles Recovery Manager (RMAN).

RMAN can be set up backup to disk or tape. The version of RMAN that comes with Oracle software can only backup to lokal tapedrives.

If you need backup to remote tapedrives such as Legato backup servers with tape libraries, you'll need third party sw to create a channel between RMAN and the tape system.

Here is an exsample RMAN script:
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;
}

For backup to tape, you substitute the allocate channel line with:
allocate channel t1 type ?sbt_tape?
parms ?ENV=(NSR_SERVER=t4t-bo-22-003,
NSR_DATA_VOLUME_POOL=test)?;

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Andreas D. Skjervold
Honored Contributor

Re: how can I backup database into tape device in Oracle

Hi again

The allocate channel line sample in my last responce is one used with Legato Networker Module for Oracle.

Remember that if you'll use cpio or other operation system means of backup you'll have to either shut down the database prior to backup or setting each tablespace in backup mode (generates lots of log activity), to get an working backup or else your backup will be worth nil.

With RMAN you can create an online backup without perfomance reduction.

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

Re: how can I backup database into tape device in Oracle

Thanks very much.
Now I know I can use RMAN or cpio to backup.
I will try later.
Thanks again.
Magdi KAMAL
Respected Contributor

Re: how can I backup database into tape device in Oracle

Hi songgh,

you may consider cold and hot backups :

1. Cold backups :
- Shutdown the oracle db :
svrmgrl
connect internal
shutdown immediate
exit

- You may use one of these commands :
tar -cvf /dev/rmt/#m /OracleDBdirectory /archiveFiles /controlFiles /OnlineRedoLogFiles
fbackup ...
cpio ...
dd ...

2. Hot backup using Recovery MANager (RMAN):
see details in Andreas RMAN example.


Magdi
Volker Borowski
Honored Contributor

Re: how can I backup database into tape device in Oracle

Hello,

following pitfalls !
1) Keep in mind, that if you use the cpio-script, you need to shut down the database before you backup. Otherwise your backup will be inconsistent. To backup the database ONLINE, you need to set all tablespaces in Backup mode before. Like here:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x6eb053921f1ad5118fef0090279cd0f9,00.html
AND
backup the corresponding archivelogs afterwards !

2) RMAN requires Oracle Enterprise Edition License :-(

Hope this helps
Volker
Bill Thorsteinson
Honored Contributor

Re: how can I backup database into tape device in Oracle

If you backup an online database you need to be
archive log mode. You generally want this turned on
anyway. Otherwise you can only recover to the
state of your last cold backup. You also want to
force a logfile switch shortly after the backup completes.

The attached script copies an on-line database to
disk. It record a point in time that can be recovered
with the database and archived redo logs created
prior to the script completing. This was used to
build a copy to the database on a daily basis.

You could also look at the script at backupcentral.com.