Rman Multiple Retention

Hi All,
I'm new in RMAN and Currently we have 14 days retention policy for daily and weekly backup.
In the same time we also will have 186days retention for monthly backup, that's mean its should be recoverable around that 3 month (for monthly).
My question is, What should I put the scripts for monthly backup ?
I saw some example its for offline backup:
BACKUP DATABASE UNTIL 'SYSDATE+365' NOLOGS;
But I want the backup should be online ?
Currently our weekly backup like this
#!/bin/bash
# SID= env | grep ORACLE_SID | cut -c12-15
export ORACLE_HOME=/oracle/BWD/112_64
export ORACLE_SID=BWD
LOGFILE=/tmp/BWD-weekly-`date +%y%m%d%H%M`.out
echo>> $LOGFILE
chmod 666 $LOGFILE
echo Script $0>> $LOGFILE
echo ==== started on `date` ====>> $LOGFILE
echo>> $LOGFILE
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
And Daily backup:
#!/bin/bash
SID=EPD
export ORACLE_HOME=/oracle/$SID/112_64
export ORACLE_SID=$SID
#LOGFILE=/tmp/EPD-weekly-`date +%y%m%d%H%M`.out
LOGFILE=/tmp/$SID-daily-`date +%y%m%d%H%M`.out
echo>> $LOGFILE
chmod 666 $LOGFILE
echo Script $0>> $LOGFILE
echo ==== started on `date` ====>> $LOGFILE
echo>> $LOGFILE
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 1 cumulative
TAG EPD_LEVEL1_DAILY_BACKUP
format 'daily_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
Appreciate if anyone has more experience to share with me the best aproach for this.

Hi,
I would change some things in your script.
It would create a routine for the backup of archivelogs separately ... every X hours (this is highly recommended).
When you perform a backup with the option 'LOGS' the archivelogs required to restore that backup will be maintained automatically. (ie The archivelogs will obey the policy Backup FULL with KEEP option).
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;Why you are executing CROSSCHECK of ARCHIVELOG on each backup execution?
I recommend you run this command only when necessary and manually. Because the ARCHVELOGS must be there. If archivelog is not on directory this can compromise your backup.
If you run the crosscheck automatically you can invalidade your backup if you don't know where is that archivelog wich is missing. Because CROSSCHECK will mark the missing ARCHIVELOG as EXPIRED and the BACKUP will execute successful but during RESTORE you will need that ARCHIVELOG and during recover database may fail.
I recommend execute crosscheck command manually and only after the error was raised on the logs. i.e Backup must fail to know what's going on. As maintenance operation if necessary we should run CROSSCHECK manually.
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
}The command "sql 'alter system archive log current';" is not required since RMAN do it automatically when start backup of archivelogs. And even if this was necessary this command should be executed before start backup of archivelogs. So you should execute BACKUP DATABASE ... separately from PLUS ARCHVELOG...
e.g :
1° (BACKUP DATABASE ... )
2° (sql 'Alter system archivelog...)
3° (Backup Archivelog all delete...)
I recommend also you format the Backup (BACKUPPIECE) of ARCHIVELOG.
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog
format 'ARC_%d_set%s_piece%p_%T_%U'  delete input;Create a script to do Backup of Archivelgos at least each 3 hours
Backup ARCHIVELOG ALL TAG 'ARC_DATE' FORMAT  'ARC_%d_set%s_piece%p_%T_%U'  delete input;As you need recover database in any point time in a window of 3 month you can do that:
backup database tag monthly_SMQ  keep until time 'sysdate+168';The all archivelogs required for recover this backup will automatically be maintained.
Regards,
Levi Pereira

Similar Messages

  • RMAN DB retention policy

    Hi,
    Does following command ONLY helpful in level 1 incremental?
    RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
    I want to configure to have 30 days backup must be available on tape.I also have policy anually to have tape backup and send to IRON MOUNT.
    If I use following command
    RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 30;
    is there any diffrence?
    If CROSSCHECK BACKUP shows expired and updated repository.Can we use expired backup for recovery purpose?
    Thanks

    see this link also
    How to delete expired backupset with RMAN ?
    Khurram                                                                                                                                                                                                                               

  • E-business Suite RMAN backup retention

    Hi,
    i want to retain my backup for clone for 90 days. One parameter need to set at RMAN level is CONFIGURE RETENTION POLICY TO REDUNDANCY 90;
    What other parameter need to set at DB level?
    Thanks

    i want to retain my backup for clone for 90 days. One parameter need to set at RMAN level is CONFIGURE RETENTION POLICY TO REDUNDANCY 90;
    What other parameter need to set at DB level?Rman backup retention policy [ID 462978.1]
    Oracle10g / 11g - Getting Started with Recovery Manager (RMAN) [ID 360416.1]
    RMAN : Consistent Backup, Restore and Recovery using RMAN [ID 162855.1]
    Backup and Recovery
    http://www.oracle.com/pls/db112/portal.portal_db?selected=4&frame=#backup_and_recovery
    Thanks,
    Hussein

  • Considerations for keeping RMAN Backup Retention to 1 Year

    Dear All,
    We are using 2-node 10gR2 RAC on Windows Server. We use Symentec Netbackup 7.5 for backing up Oracle databases. We want to change the retention period of RMAN backups to 1 year. Other than changing the RMAN Backup recovery window to 365, what are the other considerations (other configuration change, other point etc) we should be aware of?
    Best regards,
    Riaz

    > Other than changing the RMAN Backup recovery window to 365, what are the other considerations (other configuration change, other point etc) we should be aware of?
    Use RMAN Catalog.
    How to restore your database if a storage failure occurs and all files on filesystem be lost and all rman files be at MML.
    RMAN need a catalog to request files from MML (this catalog can be a controlfile, rman catalog or both), so if you lost your controlfile without RMAN Catalog you need manually find desired files on MML and restore it one by one if these files are not cataloged in that controlfile restored, since Oracle does not catalog files stored at MML. RMAN catalog files only stored on disk.

  • RMAN multiple backup schedules

    Hi,
    Version: Oracle Database 11g Release 11.2.0.3.0 Standard Edition
    OS: Red Hat Enterprise Linux Server release 6.3
    I have set up RMAN backups for a database using a full level 0 backupset backup once a week followed by level 1 differential incrementals. These backups are going to the fast recovery area on disk.
    We also have some server backup software which uses RMAN to do backups to tape. The tape backups are also incrementals.
    I am unsure if these backups know about each other. For example, will the 04:00 tape incremental only backup blocks since the previous day 04:00 tape incremental or the same day 01:00 disk incremental?
    If the backups do know about each other is it possible to separate them, so that the tape backups only know about the tape backups.
    Would the best way to be to use Incrementally Updated Backups and the RECOVER COPY OF DATABASE WITH TAG 'incr_update' syntax to apply incremental backups to an image copy? So that the tags are linked.
    Many Thanks for your help.
    Simon

    I have set up RMAN backups for a database using a full level 0 backupset backup once a week followed by level 1 differential incrementals. These backups are going to the fast recovery area on disk.
    We also have some server backup software which uses RMAN to do backups to tape. The tape backups are also incrementals.
    I am unsure if these backups know about each other. For example, will the 04:00 tape incremental only backup blocks since the previous day 04:00 tape incremental or the same day 01:00 disk incremental?You should use TAGs to separate backups, otherwise each incremental backup will use latest backup
    Would the best way to be to use Incrementally Updated Backups and the RECOVER COPY OF DATABASE WITH TAG 'incr_update' syntax to apply incremental backups to an image copy? yes, but these image copies should be on disk

  • Problems with RMAN redundancy retention

    Edited by: 878226 on Dec 5, 2011 7:05 PM

    paste from sql
    SQL>show parameter control_file_record_keep_timeAs well paste yours daily backup scripts.

  • NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES

    제품 : RMAN
    작성날짜 : 2004-05-20
    NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES
    =======================================================
    오라클 9i RMAN 에서는 백업을 보다 효율적으로 할 수 있는 기능을 보강 했다.
    지금 소개할 "Retention Policies" 기능을 통해서 보다 효율적인 RMAN 백업
    전략을 세울 수 있다.
    1. 백업 화일 최적화 방법 (Backup File Optimization)
    백업 화일 최적화란 백업에 소요되는 공간을 최소화 하는 전략이다. RMAN
    백업시에 같은 정보 (dbid, checkpoint, and resetlogs data 등등) 를 가지고 있는
    화일이 이미 존재하는 백업 셋 내부에 있는지 체크하게 된다. 만일 같은 화일이
    이미 백업 되어 있다면 BACK UP 명령은 해당 화일에 대해서는 백업을 하지 않게
    된다.
    이때 같은 화일이라고 판단하는 기준은 다음과 같다.
    * Datafile: 같은 DBID, checkpoint SCN, resetlogs SCN 과 time. 데이타 화일은
    반드시정상적으로 offline 되었거나, read-only 이거나, 또는 정상적 으로 close
    되어야 함.
    * Archived redo log: 같은 thread, sequence number, 그리고 같은 Resetlogs
    SCN 과 time.
    * Backup Set: 같은 Backup Set recid 와 stamp.
    RMAN 이 백업을 수행하다가 위와 같은 조건의 화일이 이미 존재함을 확인하면
    이것은 건너뛰게 될 화일의 대상이다. 하지만 이때 바로 Skip 을 결정하지 않고
    정해진 Retention Policies 를 조사 한후에 Skip 여부를 결정 하게 된다.
    만일 백업 명령에 DELETE INPUT option 이 사용되면 RMAN 은 백업이 Skip
    되어도 화일을 지우게 된다.
    RMAN 은 모든 화일에 대한 백업이 Skip 되어도 에러메시지나 경고를 보내지
    않는다.
    그러나 만일 데이터 화일에 대한 백업이 recovery policy window 보다 오래
    된 것 이면 RMAN 은 새로운 백업 화일을 만들기 위해서 화일을 백업 하게 된다.
    Note:
    자체적인 expirations policy 를 가지고 있는 media manager 를 사용할 경우에는
    이런 백업 최적화 정책을 사용하는 것에 신중을 기해야 한다.
    백업 최적화 를 사용하기 위해서는 CONFIGURE 명령을 사용한다. CONFIGURE
    명령은 명령 수행 이후에 이루어지는 모든 백업에 대해 적용이 된다.
    예:
    CONFIGURE BACKUP OPTIMIZATION ON; # default 는 OFF
    2. Backup Optimization에 Retention Policies 적용 하기
    Retention Policy 로 백업 최적화를 조절 할 수 있다. 그러나 retention policy를
    사용하지 않기 위해서는 'CONFIGURE RETENTION POLICY TO NONE' 을
    이용해서 명시적으로 retention policy를 사용하지 않는다고 해야 한다. 디폴트로
    REDUNDANCY = 1 이 적용 된다.
         a. Recovery Window 를 이용한 Backup Optimization
    만일 백업 최적화가 enable 되어 있고 Recovery Window 가 retention policy
    적용을 위해서 셋업 되어 있으면 RMAN 은 항상 가장 최근의 백업이 Recovery
    Window 보다 오래된 데이터 화일을 백업한다.
    예를 들면 다음과 같은 조건에서
    o Today is February 21.
    o The recovery window is 7 days.
    o The most recent backup of tablespace tbs2 to tape is January 3.
    o Tablespace tbs2 is read-only.
    2월 21일에 tbs2 테이블 스페이스를 테이프로 백업을 하라는 명령을 내리면,
    RMAN 은 이 화일이 1월3일 이후에 변경 사항이 없는데도 불구 하고 백업을 하게
    된다. 이로써 RMAN 은 최근 7일 동안에 최소한 한번의 백업이 있어야 된다는
    조건을 지키게 된다.
    이러한 작동 방식은 media manager 가 오래된 테잎을 제거 해도 되도록 한다.
    그렇지 않다면, media manager 는 1월 3일의 백업을 무한정 가지고 있게 된다.
    2월 21일에 tbs2 테이블 스페이스의 보다 최근의 백업을 만듦으로 써, RMAN 은
    media manager 가 1월 3일에 백업 했던 테입을 지워도 되도록 한다.
         b. Redundancy 를 이용한 Backup Optimization
    Retention policy 로 Redundancy 를 채택 한 경우에 RMAN 은 Redundancy
    에 1을 더한 갯수를 초과하는 오프라인 또는 읽기 전용 화일의 백업을 건너뛴다.
    이때 'CONFIGURE RETENTION POLICY TO REDUNDANCY n' 명령어로
    Redundancy의 갯수를 정한다.
    아래와 같은 백업 최적화 명령을 내린 경우를 예로 든다:
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    아카이브 테이블스페이스를 한번도 백업을 받은적이 없고 다음의 작업을 1주일
    동안 한다고 하자.
    Day Action Result Redundant Backup
    Monday Take tablespace archive offline clean.
    Tuesday Run BACKUP DATABASE. The archive tablespace is backed up.
    Wednesday Run BACKUP DATABASE. The archive tablespace is backed up.
    Thursday Run BACKUP DATABASE. The archive tablespace is backed up. Tuesday backup.
    Friday Run BACKUP DATABASE. n/a Tuesday backup.
    Saturday Run BACKUP DATABASE. n/a Tuesday backup.
    Sunday Run DELETE OBSOLETE. The Tuesday backup is deleted.
    Monday Run BACKUP DATABASE. The archive tablespace is backed up. Wednesday backup.
    화요일, 수요일, 그리고 목요일의 백업은 아카이브 테이블 스페이스를 복사 해서
    3개의 백업이 반드시 존재 해야 한다는 조건을 충촉 시킨다. (1+Redundancy)
    금요일과 토요일에는 백업 최적화 조건에 의해서 아카이브 테이블 스페이스를
    복사하지 않게 된다.
    RMAN 은 일요일에는 유효기간이 지난 백업 화일을 지우게 된다. 따라서 화요일에
    만든 백업은 삭제 된다. 월요일의 전체 백업은 3개의 백업이 존재 해야 한다는 조건
    때문에 아카이브 테이블 스페이스를 또 다시 백업하게 된다. 이런 방식으로 백업
    사이클이 진행 된다.
    3. RETENTION POLICY NONE vs. DEFAULT
    주의 사항:
    'CONFIGURE RETENTION POLICY TO NONE' 과 'CONFIGURE RETENTION
    POLICY TO DEFAULT' 는 그 의미가 같지 않다. 전자는 RETENTION POLICY
    자체가 존재 하지 않는다는 의미 이며 백업은 expire 되지 않으며 'DELETE
    OBSOLETE' 명령은 사용 할 수 없게 된다. 후자는 디폴트 RETENTION POLICY
    (REDUNDANCY 1) 를 사용하게 된다는 의미 이다.
    'DELETE OBSOLETE' 명령은 RETENTION POLICY 기준으로 expire 된 백업을
    제거 하라는 명령이다.
    보다 자세한 내용은 Oracle9i Recovery Manager User's Guide and
    Reference의 Backup Optimization 부분을 참고 하시기 바랍니다.
    --------------THE END----------------------------------------------

    Hi,
    Backup optimisation = +- do not copy empty space.
    So, when you issue your BACKUP statement, it backs up the datafile. dot. nothing more.
    In order to achieve what you're testing, look into TFM for BACKUP INCREMENTAL LEVEL x .
    Regards,
    Yoann.

  • RMAN RETENTION POLICY configuration.

    Currently I am doing RMAN backup once a day and save the copy to tapes through TSM. If I want to keep 15 copies of the db (NOT 15 same copies. It will be one copy from every day backup, so each copy will be different). How should I configure the RETENTION POLICY? Shall I do
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;
    Or shall I do
    RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    Also do I need to configure anything on the TSM side?
    Thanks.

    To keep the last 15 full backups use redundancy 15.
    You don't need to do anything on TSM if:
    - you use RMAN to backup directly to tape device and
    - you use RMAN DELETE OBSOLETE statements to purge old backups.
    See http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV8400

  • Rman backup with different retention

    Hi,
    I have to write script on RMAN backup retentions and policies.
    My requirement is as below:
    Daily backup Name and retentions : db_daily_bkp_sun,db_daily_bkp_mon...with 7 days retension
    Weekly backup Name and retentions : db_wkly_bkp_01,db_wkly_bkp_02...with 4 backup retension
    Monthly backup Name and retentions : db_mnth_bkp_jan,db_mnth_bkp_feb...with 12 backups
    Yearly backup Name and retentions : db_yearly_bkp_2010,db_yearly_bkp_2011,db_yearly_bkp_2012
    All backups will be full online. We have to store backups in local disk.
    We have created backup locations on disk as below.
    Daily : /orabackup/daily
    Weekly : /orabackup/weekly
    Monthly: /orabackup/monthly
    Yearly : /orabackup/yearly
    So is it possible to take such backups in RMAN without using any third party software ? If possible then please provide me such script.
    With Regards,
    Khokhar Murtuja S
    Database Administrator

    Hi,
    RMAN will make you have only one retention.
    You can have more kind of retention using the option "keep until" in your backup command.
    It'll certainly do what you need.
    Greets,
    Loïc

  • Rman retention window doubt

    Hello, i have RMAN backup in the way of backupsets on two node 11gR2 RAC on linux standard edition.
    RMAN> show all;
    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name MGW are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_mgw2.f'; # default
    RMAN>And now i dont understand why RMAN is not deleting backupsets that are older then 24 hours , although i have set
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS.
    I have in my rman script that is executing every day @ 23:00 this:
    backup as COMPRESSED BACKUPSET database FORMAT '/home/oracle/rman/%U' plus archivelog delete input;
    delete noprompt obsolete;And now i see in my rman backup folder that there is backupset from yesterdey 23:00 ,and also from the day before yesterday 23:00.
    [oracle@data02 rman]$ ls -l
    total 51889864
    -rw-r----- 1 oracle asmadmin 26454474752 Jul 14 00:19 0bmhcc1s_1_1
    -rw-r----- 1 oracle asmadmin     1245184 Jul 14 00:19 0cmhcg84_1_1
    -rw-r----- 1 oracle asmadmin 26626334720 Jul 15 00:18 0fmhf0ep_1_1
    -rw-r----- 1 oracle asmadmin     1245184 Jul 15 00:18 0gmhf4ih_1_1
    -rw-r--r-- 1 oracle oinstall           0 Jul 14 16:52 aa_1_1I thoght that if i have run my rman script today @ 23:00 , than that will do backup but also delete backup from the day before because i have set
    retention to 1 day .
    Can you please say why i am wrong in this ?

    The RMAN retention policy doesn't just keep the amount of days specified. It calculates the interval from the end of the current time and extends back in time for the number of days specifed.
    So for example if you set the backup retention policy to 1 day today. Then RMAN will keep the backups for 15th July, 16th July.
    Then on the 17th July, the 15th July backup will be obsolete.
    I.e.
    Current date   Status                                 Recovery Point
    15th July        available                               15-1 = 14th July
    16th July        available                               16-1 = 15th July
    17th July        backup of 15th July obsolete  17-1 = 16th July
    So your backup for today wouldn't be marked as obsolete until the 17th July.
    5 Configuring the RMAN Environment
    However, if you have a fixed-date database then you should be setting the retention policy to redundancy instead of recovery window.
    RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;

  • Rman Retention Target.

    Hi All,
    I am using Oracle 10g RAC database and my retention policy is of 7 days.
    But when i use report obsolete then all my backup sets are 2 days prior to current date is dispalyed as obsolete where as all archive log files are following retention policy . Please suggest possible reason why this is happening.

    Recovery window - based on the lenght of time to retain backups
    Redundancy - number of backup copies to retain.
    Recovery window :-
    You can decide that you want your backups to be reatined in the FRA for a specific no of days.After the speified no of days,rman will mark the backups as obsolete, making them eligible for deletion.
    By using a recovery window, you're assuring that you can recover your database to any point within the recovery window.For Ex.If your recovery window is configured to be seven days, you can recover the database to any day and time within the last week.
    RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    the above commands , any backup file that's older than 7 days is marked obsolete by rman.
    Redudancy :-
    RMAN keeps a single copy of each backe up datafile and control file.However, you can specify that RMAN retain more than a single copy of a backed up datafile or control file by using the redundanct parameter of the retention policy command. rman will mark any additional copies of a datafile backup or a control file that exceed the value of the redundancy paramteter as obsolete.
    *RMAN will always retain all arhived redo logs and incrementals backups as necessary to recover just the non-obsolete backups.RMAN won't automatically delete obsolete backup file, the jobs falls to DBA. Use Report obsolete.
    Supposed to be, Configure retention policy to none, you can specify that , this means RMAN will never consider any backup as obsolete,If you're using FRA, RMAN can't delete a file from FRA,so in this case your FRA will be running out of memory spaces.Sure you will get error.
    I hope you can understand now about both.

  • RMAN-05021 configuring retention policy on standby

    Hello all.
    Running Oracle 11.2.0.2 on Linux (x64); single-node instance.
    We've the following setup:
    bvlive (PRIMARY)
    bvstby2 (STANDBY)
    We currently have a retention policy of 21 days, and backup space on the standby is starting to be an issue.
    Initially, I thought I could reconfigure this on the standby - but RMAN won't allow this:
    STANDBY:
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 days;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of configure command at 10/15/2012 10:09:50
    RMAN-05021: this configuration cannot be changed for a BACKUP or STANDBY control fileWhich makes sense when I think about it. I saw this thread retention policy is not configure but get different results:
    PRIMARY:
    RMAN> configure retention policy to recovery window of 14 days;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 21 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
    new RMAN configuration parameters are successfully stored
    RMAN> show all;
    RMAN configuration parameters for database with db_unique_name BVLIVE are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;STANDBY:
    RMAN> SHOW ALL;
    RMAN configuration parameters for database with db_unique_name BVSTBY2 are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 21 DAYS;Which also makes sense; so I'm not convinced the original poster solved his problem. I've seen a few threads about this which involve:
    1. shutting down standby
    2. configuring retention policy on primary
    3. taking a backup controlfile from primary
    4. copying it across to the standby
    5. restarting standby using the backed-up controlfile
    But then this seems to be for RAC, which we're not using.
    It occurred to me that I could use the KEEP UNTIL option when taking backups, but ran into; ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes (i.e. I can't use KEEP and store backups in the FRA).
    Can anyone please advise on the best way to get the retention period down on the standby, ideally without having to rebuild the standby from scratch?
    Thanks,
    Ray
    Edited by: ray_h on 15-Oct-2012 03:33

    Hello all.
    @ P. Forstmann: thanks for confirming.
    @ S Rao: Yep - this is the link I had in mind. Tried it out and it worked. One thing to note is that I didn't have to rename datafiles - presumably creating the standby controlfile negates the need for this in 11g (indeed, the alert log shows these two lines when you mount):
    Set as converted control file due to db_unique_name mismatch
    Changing di2dbun from bvlive to bvstby2which put my mind at ease when the rename commands failed, saying the files didn't exist
    @ mseberg: Typically, our MOS license ran out just as a useful link shows up.
    Thanks everyone.
    Ray

  • Archivelog files and Rman backup

    Hi all,
    Please somebody guide me regarding the following concept.
    We have the oracle server version 10.2.0.1.0, working with Windows OS,
    I had set the parameter log_archive_dest_1 for locating archivelog files, then I had changed the archivelog files to the flash recovery area(located in another disk) by using the parameters db_recovery_file_dest_size and db_recovery_file_dest.
    Now the archivelog files are being located at two different location. At this point, If I take backup for archivelog files with the aid of RMAN, then ,
    How will the RMAN take backup from those two different locations?
    Thanks&Regards,
    Jai.

    PROBLEM :
    I have archivelogs duplexed - when running RMAN - rman backups up the archivelogs from both duplexed destinations - from the user manual - this should not be the case, any ideas?
    Details:
    I have archivelogs duplexed
    I have the following set in rman :
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/rman/WPPMD/control_%F';
    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 10 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/WPPMD/backup_%d_%T_%U' MAXPIECESIZE 10 G;
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'LOW' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
    CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_WPPMD.f'; # default
    When I run backups via a script :
    backup incremental level=$RMAN_LEVEL database plus archivelog;
    ($RMAN_LEVEL changes between 0 and 1 depending on the day of the week)
    It backs both duplex copies of the same archivelog
    From the document :
    Oracle10g / 11g - Getting Started with Recovery Manager (RMAN) [ID 360416.1]
    It says :
    Even if your redo logs are being archived to multiple destinations and you use RMAN to back up archived redo logs,
    RMAN selects only one copy of the archived redo log file to include in the backup set. (Since logs with the same log sequence number are identical, there is no need to include more than one copy.)
    But this is not the case ie
    RMAN> list archivelog sequence 2445;
    using target database control file instead of recovery catalog
    List of Archived Log Copies for database with db_unique_name WPPMD
    =====================================================================
    Key Thrd Seq S Low Time
    4640 1 2445 A 17-DEC-10
    Name: /log/recovery_area/WPPMD/archivelog2/1_2445_735315419.dbf
    4639 1 2445 A 17-DEC-10
    Name: /log/recovery_area/WPPMD/archivelog/2010_12_17/o1_mf_1_2445_6jpx9n7c_.arc
    So it still backing up both copies of the archive log.
    Any ideas? is this a bug?
    Thanks
    Luca
    Edited by: user4599449 on 17-Dec-2010 07:05
    Edited by: user4599449 on 17-Dec-2010 07:06

  • Recovery Window-Based Retention VS Redundancy-Based Retention

    Hi Experts,
    We'd like to know your take on the use of Recovery Window-Based Retention Policy e.g.
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;against the use of Redundancy-Based Retention Policy, e.g.
    CONFIGURE RETENTION POLICY TO REDUNDANCY 7;Do you have any recommendations or preferences to which should be used? Is there a preferred method by oracle?
    We're currently setting up RMAN for a client that's using Oracle 11.1.0.7 standard edition, so is there a preference to what's better suited for the standard edition? The plan is to back up data to Disk, and this data will be then backed up to tape.
    Thanks

    REDUNDANCY 7 is 7 backups -- irrespective of the number of days.
    If you are running only 1 backup a day, you'd assume that it is equivalent to 7 days. However, if one day you run a backup twice, then the 7-day old backup becomes redundant ! If, the next day, you again run the backup twice, the 5-day old backup becomes redundant ! (Conversely, if you don't run a backup for 2 days, then even the 9 day old backup is not redundant !).
    So, be aware (or beware) that any adhoc backup runs or changes to the backup frequency would change your retention duration (and if this happens 6 months from now, the IT Manager / DBA onsite may not know that retention has changed !)
    Hemant K Chitae

  • Can i use the retention policy without using the Flash Recovery area?

    Yes ,lets see here
    RMAN>list backup summary
    C:\>dir *.bus
    Volume in drive C is khurram
    Volume Serial Number is F49D-FF2B
    Directory of C:\
    File Not Found
    C:\>dir *.arc
    Volume in drive C is khurram
    Volume Serial Number is F49D-FF2B
    Directory of C:\
    File Not Found
    RMAN> crosscheck backup
    2> ;
    using channel ORA_DISK_1
    RMAN> list backup summary
    2> ;
    RMAN> show retention policy
    2> ;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    RMAN> run {
    2>   allocate channel ch0 type disk;
    3>   backup as compressed backupset database format
    4>   'c:\rman_%s_%d_%T.bus'
    5>   plus archivelog format 'c:\arch_%s_%d_%T.arc';
    6>   release channel ch0;
    7>   allocate channel ch1 device type disk format 'c:\arch_%s_%d_%T.arc';
    8>   release channel ch1;
    9>   delete force noprompt obsolete;
    10>   allocate channel ch2 device type disk format 'c:\rman_%s_%d_%T.bus';
    11>   release channel ch2;
    12>   delete force noprompt obsolete;
    13> }
    released channel: ORA_DISK_1
    allocated channel: ch0
    channel ch0: sid=146 devtype=DISK
    Starting backup at 15-APR-08
    current log archived
    channel ch0: starting compressed archive log backupset
    channel ch0: specifying archive log(s) in backup set
    input archive log thread=1 sequence=24 recid=79 stamp=652108461
    input archive log thread=1 sequence=25 recid=80 stamp=652112650
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\ARCH_130_ORCL1_20080415.ARC comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:05
    Finished backup at 15-APR-08
    Starting backup at 15-APR-08
    channel ch0: starting compressed full datafile backupset
    channel ch0: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\SYSTEM01.DB
    F
    input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\SYSAUX01.DB
    F
    input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\USERS01.DBF
    input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\UNDOTBS01.D
    BF
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\RMAN_131_ORCL1_20080415.BUS comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:45
    Finished backup at 15-APR-08
    Starting backup at 15-APR-08
    current log archived
    channel ch0: starting compressed archive log backupset
    channel ch0: specifying archive log(s) in backup set
    input archive log thread=1 sequence=26 recid=81 stamp=652112703
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\ARCH_132_ORCL1_20080415.ARC comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:02
    Finished backup at 15-APR-08
    Starting Control File and SPFILE Autobackup at 15-APR-08
    piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL1\AUTOBACKUP\2008_
    04_15\O1_MF_S_652112718_408X3ZVJ_.BKP comment=NONE
    Finished Control File and SPFILE Autobackup at 15-APR-08
    released channel: ch0
    allocated channel: ch1
    channel ch1: sid=146 devtype=DISK
    released channel: ch1
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=146 devtype=DISK
    Deleting the following obsolete backups and copies:
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           128    15-APR-08
      Backup Piece       128    15-APR-08          C:\ARCH_130_ORCL1_20080415.ARC
    Archive Log          79     15-APR-08          C:\ORACLE\PRODUCT\10.1.0\FLASH_RE
    COVERY_AREA\ORCL1\ARCHIVELOG\2008_04_15\O1_MF_1_24_408RYXDF_.ARC
    Archive Log          80     15-APR-08          C:\ORACLE\PRODUCT\10.1.0\FLASH_RE
    COVERY_AREA\ORCL1\ARCHIVELOG\2008_04_15\O1_MF_1_25_408X1SCR_.ARC
    deleted backup piece
    backup piece handle=C:\ARCH_130_ORCL1_20080415.ARC recid=128 stamp=652112652
    deleted archive log
    archive log filename=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVEL
    OG\2008_04_15\O1_MF_1_24_408RYXDF_.ARC recid=79 stamp=652108461
    deleted archive log
    archive log filename=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL1\ARCHIVEL
    OG\2008_04_15\O1_MF_1_25_408X1SCR_.ARC recid=80 stamp=652112650
    Deleted 3 objects
    released channel: ORA_DISK_1
    allocated channel: ch2
    channel ch2: sid=146 devtype=DISK
    released channel: ch2
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=146 devtype=DISK
    no obsolete backups found
    RMAN>
    C:\>dir *.bus
    Volume in drive C is khurram
    Volume Serial Number is F49D-FF2B
    Directory of C:\
    04/15/2008  02:24 PM        96,813,056 RMAN_131_ORCL1_20080415.BUS
                   1 File(s)     96,813,056 bytes
                   0 Dir(s)  61,960,724,480 bytes free
    C:\>dir *.arc
    Volume in drive C is khurram
    Volume Serial Number is F49D-FF2B
    Directory of C:\
    04/15/2008  02:25 PM            56,832 ARCH_132_ORCL1_20080415.ARC
                   1 File(s)         56,832 bytes
                   0 Dir(s)  61,960,724,480 bytes free
    C:\>
    RMAN> run {
    2>   allocate channel ch0 type disk;
    3>   backup as compressed backupset database format
    4>   'c:\rman_%s_%d_%T.bus'
    5>   plus archivelog format 'c:\arch_%s_%d_%T.arc';
    6>   release channel ch0;
    7>  }
    released channel: ORA_DISK_1
    allocated channel: ch0
    channel ch0: sid=146 devtype=DISK
    Starting backup at 15-APR-08
    current log archived
    channel ch0: starting compressed archive log backupset
    channel ch0: specifying archive log(s) in backup set
    input archive log thread=1 sequence=26 recid=81 stamp=652112703
    input archive log thread=1 sequence=27 recid=82 stamp=652112873
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\ARCH_134_ORCL1_20080415.ARC comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:02
    Finished backup at 15-APR-08
    Starting backup at 15-APR-08
    channel ch0: starting compressed full datafile backupset
    channel ch0: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\SYSTEM01.DB
    F
    input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\SYSAUX01.DB
    F
    input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\USERS01.DBF
    input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL1\UNDOTBS01.D
    BF
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\RMAN_135_ORCL1_20080415.BUS comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:45
    Finished backup at 15-APR-08
    Starting backup at 15-APR-08
    current log archived
    channel ch0: starting compressed archive log backupset
    channel ch0: specifying archive log(s) in backup set
    input archive log thread=1 sequence=28 recid=83 stamp=652112925
    channel ch0: starting piece 1 at 15-APR-08
    channel ch0: finished piece 1 at 15-APR-08
    piece handle=C:\ARCH_136_ORCL1_20080415.ARC comment=NONE
    channel ch0: backup set complete, elapsed time: 00:00:02
    Finished backup at 15-APR-08
    Starting Control File and SPFILE Autobackup at 15-APR-08
    piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL1\AUTOBACKUP\2008_
    04_15\O1_MF_S_652112928_408XBKCZ_.BKP comment=NONE
    Finished Control File and SPFILE Autobackup at 15-APR-08
    released channel: ch0
    RMAN> report obsolete
    2> ;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           129    15-APR-08
      Backup Piece       129    15-APR-08          C:\RMAN_131_ORCL1_20080415.BUS
    Backup Set           130    15-APR-08
      Backup Piece       130    15-APR-08          C:\ARCH_132_ORCL1_20080415.ARC
    Backup Set           131    15-APR-08
      Backup Piece       131    15-APR-08          C:\ORACLE\PRODUCT\10.1.0\FLASH_RE
    COVERY_AREA\ORCL1\AUTOBACKUP\2008_04_15\O1_MF_S_652112718_408X3ZVJ_.BKP
    Backup Set           132    15-APR-08
      Backup Piece       132    15-APR-08          C:\ARCH_134_ORCL1_20080415.ARC
    Archive Log          81     15-APR-08          C:\ORACLE\PRODUCT\10.1.0\FLASH_RE
    COVERY_AREA\ORCL1\ARCHIVELOG\2008_04_15\O1_MF_1_26_408X3HRP_.ARC
    Archive Log          82     15-APR-08          C:\ORACLE\PRODUCT\10.1.0\FLASH_RE
    COVERY_AREA\ORCL1\ARCHIVELOG\2008_04_15\O1_MF_1_27_408X8RXN_.ARC
    RMAN>Note: i have archivelog which is at FRA ,it also apply there and as well yours own defined backupsets path.
    Yours comments are wellcome.
    http://oraware.blogspot.com/2008/04/can-i-use-retention-policy-without.htmlKhurram

    Hmmm, I can't see where the confusion originates. The table near the bottom of www.apple.com/timecapsule/specs.html has one row labelled "For backup using Time Machine" and another row labelled "For AirPort Disk with a USB hard drive".
    The requirement for backup via Time Machine is OS 10.5.1 or better. Time Machine is not supported in pre-Leopard (OS 10.5) nor in Windows.
    The requirement for using Time Capsule as a remote disk is identified as "Mac with Mac OS X v10.4.8 or later" or "PC with Windows XP (SP2) or Windows Vista; Bonjour for Windows (included on Time Capsule CD)".
    Doesn't that pretty much spell out that Time Capsule works as a network drive without the need for Time Machine?
    Also Joe (the OP) never indicated any desire to use it with Windows so I'm not sure why all the discussion about Windows compatibility. ??
    Also the quote posted by Henry seems pretty clear:
    "Time Capsule with Time Machine in Leopard is the ideal backup solution. But that doesn’t mean Tiger, Windows XP, and Windows Vista users can’t enjoy the benefits of Time Capsule, too. Because it mounts as a wireless hard drive, Tiger and Windows users simply access Time Capsule directly from the wireless network for exchanging and storing files quickly and easily."

Maybe you are looking for