Home » RDBMS Server » Backup & Recovery » RMAN - Naming convetion & Retension queries
RMAN - Naming convetion & Retension queries [message #218307] Wed, 07 February 2007 12:42 Go to next message
Ksaravan
Messages: 17
Registered: January 2007
Location: Portland
Junior Member
Hi,
Im first time implementing the RMAN backup on DW environment. I dont get proper guidance or clarity when i got documents some time. Hence im writing to expert forum to get clarified my doubts. It may not sense some time please execuse me.

1. Naming conventions.. control file format ct_t%t_T%T_d%d_s%s
or
db_t%t_T%T_d%d_s%s_p%p.db' for database.. what %t means what is %s means.. ( i know few things point to date and seconds. But im not clear on few other things.. what is best method how default works..


2. I ran the following command. I think this is full backup.
backup as COMPRESSED BACKUPSET tag '%TAG' database include current controlfile;
after running the above backup if i run incremental back up what will happen?

3. Do i need to mention "LEVEL 0" in the backup script to use incremental backup scripts later or system will issue fullbackup i have taken one hour before so from that point only take incremental backup now?? How it will work? if i need to mention LEVEL 0 what is the difference between with LEVEL 0 key word and without LEVEL 0 key word

4. When the backup became a expired or ob-solute. today i taken full backup/level 0

two day i will take incremental third day i am taking again LEVEL 0 or full back up.

now i want to delete today's full backup how it will be done. via retention policy or script what should i mention to delete previous full back after taking new full back up. When one backup set/copy will became expired...

Thanks in advance.

Regards
KSaravan


Re: RMAN - Naming convetion & Retension queries [message #218310 is a reply to message #218307] Wed, 07 February 2007 13:01 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
1)
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta033.htm#sthref531
2)
You did a full database backup.
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1005.htm#sthref244
Quoting above URL
A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data. The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy.

3)
Already answered above.
Level 0 backup is almost like full database backup.
Except that the full database backup (without level 0) will NOT BE CONSIDERED for the later incremental backup.
So, for incremental backup strategy, you need to mention LEVEL 0 as base backup.

4)
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1007.htm#sthref279
Explained in documentation.
Retention policy decides when the backupsets will get OBSOLETE.
When you issue CROSSCHECK command, RMAN will check for the entries in catalog against its physical
location. If it is not found, those backupsets are marked EXPIRED.
>>via retention policy or script
better to use retention policy.
You can manually set it via scripts (I myself still do them in 9i), but just save yourself from one more pain.

[Updated on: Wed, 07 February 2007 13:02]

Report message to a moderator

Re: RMAN - Naming convetion & Retension queries [message #218329 is a reply to message #218310] Wed, 07 February 2007 15:08 Go to previous messageGo to next message
Ksaravan
Messages: 17
Registered: January 2007
Location: Portland
Junior Member
Rajendran,

Great.. Thanks a lot.. few of things cleared now. Further i will gothrough link and get back to you if i have some questions.. As you said now i added incremental level 0 in my script and testing..

Thanks for your quick response again..

Regards
KSaravan
Re: RMAN - Naming convetion & Retension queries [message #218334 is a reply to message #218310] Wed, 07 February 2007 15:41 Go to previous messageGo to next message
Ksaravan
Messages: 17
Registered: January 2007
Location: Portland
Junior Member
Hi,

For in case of this scenario what i should do..

I said retention policy 8 days. First week LEVEL 0 back is success.second week sunday it didnt happened due to some issue. I came to next day Monday about this backup failure but i could n't run manually due to some reason or forgot. next day my first week backup also became an obsolute. So tuesday if any crash happens im left with no backup. What is solution. How to avoid after next sucessful backup only i want my previous back up should be deleted.. How it can be achieved. Also shall i included my delete command also in the script..

Regards
KSaravan
Re: RMAN - Naming convetion & Retension queries [message #218341 is a reply to message #218334] Wed, 07 February 2007 16:15 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Forget about the incremental strategy for now.
>>So tuesday if any crash happens im left with no backup.
It is generally assumed you move those backupsets to TAPE everyday.
So, if you loose your physical backup location , you can restore it from tape.
By saying 8 days of retention, it is generally assumed that is for your local disk only. Tape backups tend to be around for atleast 2 weeks locally (within your premises).
>>How to avoid after next sucessful backup only i want my previous back up should be deleted.
Write a script.
Check the logs/status and decide upon whether to purge the oldbackups or not.
What i do is
1. Schedule backup and purging old backupsets in cron.
   Purge script will always check for entries in rman_alert_sid.log.
2. Always create a log file for backup.
   If there is an error, write the contents of error to my rman_alert_sid.log and page it to myself.
3. In next cycle, Purge script will find entries in rman_alert_log and will NOT PURGE the backupsets that are older than N days (I want to keep locally). 
4. I will have to manually clear the alert.

Depending on your OS, all this can be done in few lines of scripting.


Re: RMAN - Naming convetion & Retension queries [message #218345 is a reply to message #218341] Wed, 07 February 2007 16:26 Go to previous messageGo to next message
Ksaravan
Messages: 17
Registered: January 2007
Location: Portland
Junior Member
Hi,

Yes i will take the backupsets in to tape. due to retention policy my control file also not have the expired backups. RMAN prompt if i give list backup it wont be there. right? after restoring from tape to physical location again.. how RMAN will recognize that this is full back and etc., or manually i need to give some commands to restore it back to original location and recover it. How it will work..i didn't get this point.

Oh god any other way to do those things. i never written shell scripts now start learning.. so purging via script and risk without knowing the shell script programming is it right? my script may delete entire stuff. my os is AIX can pls let me know where can get these scripts so that i can modify according to my environment variables.

Regards
KSaravan
Re: RMAN - Naming convetion & Retension queries [message #218346 is a reply to message #218345] Wed, 07 February 2007 16:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>How it will work..i didn't get this point.
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/advmaint004.htm#sthref885
>>Oh god any other way to do those things.
It sounds complicated. But much simpler.
First try with simple files. You need to know about a few commands.
>>where can get these scripts
That is more dangerous. Every site is different. You need to understand it first.
search the forum. there are numerous examples.
One such (little outdated)
http://orafaq.com/scripts/unix/purgecat.txt
But all you need is one command (something like this)
find . -atime +your_retention -name "*.bak" -exec /bin/rm {} \;

Search Unix/linux forums.
there are many exampes. Like this
http://www.orafaq.com/forum/t/73567/42800/



Re: RMAN - Naming convetion & Retension queries [message #218348 is a reply to message #218341] Wed, 07 February 2007 16:47 Go to previous message
Ksaravan
Messages: 17
Registered: January 2007
Location: Portland
Junior Member
hi
thanks
what the below command do
archivelog all delete input. What is delete input means?

How to mention cumulative backup from level 0

i mentioned in my script backup incremental level 0 database;
backup cumulative level 0 database is right syntax? Again bit confused abt differential back /cumulative under multilevel incremental backup's topic in the above mentioned URL.
do i need to mention like backup incremental level 1/0 like this or how?

Thanks in advance

Regards
KSaraava
Previous Topic: How to drop asm disk groups which can't be mounted
Next Topic: How to recover with archive logs when I create a new tablespace after full backcup.
Goto Forum:
  


Current Time: Sat Nov 30 03:07:24 CST 2024