1748027 Members
4277 Online
108757 Solutions
New Discussion юеВ

Cold backup

 
SOLVED
Go to solution
Asif_8
Regular Advisor

Cold backup

can I take cold backup by RMAN 9i
If yes How ?
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: Cold backup

RMAN is generally used for hot backups of your oracle database. If you want to do a cold backup, a backup with the Oracle DB shut down, then I would just use whatever your normal backup software is (fbackup, OmniBack, Data Protector, etc.) and backup the file systems that contain your oracle data files.
Mic V.
Esteemed Contributor

Re: Cold backup

You may be interested in a kind of simulated cold backup (I don't know what else to call it, help?). I've heard RMAN is difficult to set up and consumes much disk space.

The solutions is a new command introduced in 8i. I use "alter system suspend"/"alter system resume" to get a cold backup.

Using EMC TimeFinder, roughly speaking, I sync the BCV set and wait until done, put all tablespaces into backup mode, alter system suspend, split the bcvs, alter system resume, remove all tablespaces from backup mode, then mount the BCVs (on another system, could be on the same system) and run a cold backup using my normal backup software.

There is no application downtime and it seems to be a perfectly acceptable cold backup.

Mic
What kind of a name is 'Wolverine'?
Yogeeraj_1
Honored Contributor

Re: Cold backup

hi,

Why do you want to take a cold backup?

When you take a cold backup, you achieve the following:

o you will cause downtime (the database will be shutdown)

o you will empty the buffer cache, causing us to refill it every day, incurring more work every day.

o you will empty the shared pool, causing us to reparse the entire set of queries every day, day in -- day out.

o you will most likely do an unattended shutdown and startup in order to do this cold backup. cold backup typically implies unattended shutdown/startup

But if you really want to do it, you can!
below the demo script:
B_ClosedDB.rcv - Backup Closed Database (cold backup):
------------------------------------------------------------------------------
shutdown immediate;
startup mount pfile=/beta/app/oracle/product/817_B/dbs/initM817.ora

run {
set command id to 'RMAN';
allocate channel d1 type disk;
allocate channel d2 type disk;
setlimit channel d1 kbytes 2097150;
setlimit channel d2 kbytes 2097150;
backup full format '/beta/home/marrocha/backup/df_%U' database;
backup
filesperset 10
format '/beta/home/marrocha/backup/arc_%U'
archivelog all delete input;
}

shutdown;
startup pfile=/beta/app/oracle/product/817_B/dbs/initM817.ora


=======================================
hope this helps!
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Sanjiv Sharma_1
Honored Contributor

Re: Cold backup

Hi Asif,

RMAN is meant mainly for online backup.

For cold backup, you can simply shutdown Oracle 9i and take the filesystem backup through any backup utility.

HTH,
Everything is possible
T G Manikandan
Honored Contributor

Re: Cold backup

RMAN is a specialized backup utility from ORacle.You can do anything with RMAN related to backup and recovery of the Oracle database.

To take a cold backup,you can either use the copy command of RMAN or the cp command of OS.

check the doc of RMAN which can help u.

http://www.csee.umbc.edu/help/oracle8/server.815/a67773/rmanconc.htm#440395
Brian Crabtree
Honored Contributor
Solution

Re: Cold backup

Asif,

To answer your question, you can perform an offline backup of the database with rman. The following is a basic idea, with all of the commands being run from the rman utility (or inside of Omniback):

-------
shutdown abort;
startup restrict;
shutdown immediate;
startup mount;
run {
allocate channel t1 type 'sbt_tape';
allocate channel t2 type 'sbt_tape';

backup database including current controlfile;
}
alter database open;
-------

The database MUST be mounted, but the database cannot be opened for this to work (hence the shutdowns). You should always make sure that the database is down in a consistant state by issuing a normal 'shutdown' or 'shutdown immediate', but not a 'shutdown abort'.

Let me know if you have any questions.

Thanks,

Brian
Asif_8
Regular Advisor

Re: Cold backup

thanks all of them

If you take the cold back from rman, restore the cold also rman or OS level

Michael Schulte zur Sur
Honored Contributor

Re: Cold backup

Hi,

shutdown abort;
startup restrict;
shutdown immediate;

this is a bit confusing to me. You say, don't use abort and what is this?

Afif, if you use rman to back it up than you will have to use rman to restore it.

Michael
Brian Crabtree
Honored Contributor

Re: Cold backup

Michael,

Sorry, I will explain more.

'shutdown abort' causes the database to kill off all processes without trying to recover the sessions currently running. So any updates/inserts/deletes that are running have updated blocks in the database without committing the current transaction. This is called an inconsistant state.

'shutdown immediate' sends a notification to sessions that the database is going to be shutdown, and processes are forced to stop processing after completing the current transaction occuring. Once the sessions have stopped running, the database begins cleaning up the tablespaces for free extents, completes all checkpoints, and closes the database in a consistant state.

One of the problems that can occur is that a user or database process will hang. This causes 'shutdown' and 'shutdown immediate' to wait for the process to exit before proceeding, which will never happen. An easy workaround for this is to issue a 'shutdown abort', which disconnects all processes, in case some of them are hanging or long-running. You then MUST issue a startup of some kind, which will open the database ('startup restrict' or 'startup force dba' will bring the database up in a mode that disallows normal users from accessing the database). The next step after opening is to run through the online redo logs and rollback segments with a crash recovery routine. This will make sure that all database blocks are consistant and correct.

Once the crash recovery is complete, the database can be issued another 'shutdown' command, which will close the database in a consistant state, and the backup can be run.

I hope this answers your question.

Thanks,

brian