Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: October 27, 2016 - 3:09 pm UTC

Last updated: November 16, 2016 - 4:45 am UTC

Version: 12.1

Viewed 1000+ times

You Asked

Hello Team,

We have oracle 12c standard running on centos.
Basic backup strategy is developed without using asm/ catalog database as suggested in requirements.

Backup Plan is as below:
Requirement says full backup has to run every night with transaction logs backups every 30 minutes.

To implement this ,
- we have set up fra with db_create_dest_size to 10 G.
- Running Incremental differential backup.
- Running Level 0 (considering is similar to full backup) at 4 AM
- Running Level 1 every 30 minutes other than 4 AM time when Level 0 backup is performed.
- Created a shell script to run the rman backups and scheduled using crontab.
- Tested this strategy by recovering the database to specific time and works fine.

With the backup strategy finding issues with the FRA storage space.However nothing seems to contribute.
- Retention policy is set to 2 days
- backupsets are created as compressed .
- Within shell script , trying to delete all the expired and obsolete backups.

Can you please suggest what other methods can be followed to conserve FRA memory. Is there any possibility in RMAN to delete all previous level 1 and level 0 backups once new level 0 back up is created.

Thanks



and Connor said...

From reading your requirement, you dont need an incremental *database* backup every 30 mins, you just need to backup the archivelogs every 30 mins.

So do you level 0 at 4am, and every 30 mins just do:

backup archivelog ...;

where '...' is an appropriate strategy for you, eg not backed up at least twice etc.

Your recovery times might be slightly longer (because you'll go back to the level 0 for recovery), but you could always do a single incremental at (say) 4pm.


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, November 11, 2016 - 4:23 pm UTC

Hello Team,

Thanks for your guidance.
I have made the suggested changes.I have couple more questions.

The written shell script does the below:
1.delete obsolete and expired in RMAN.
2. Backup
- Level 0 at 4 AM
- Level 1 at 4 PM
- Archivelog every 30 minutes.
3. Delete the unix file directories.
- Deleting all the archivelog , autobackup files , backup sets that are older than exactly one day.
I am not sure if its appropriate to delete the files on unix directly to forcefully expire the backups and archivelogs. In Happy path , i have'nt found any issue in recovery tested for more than a week as I am doing level 0 backup every day and previous level 0 is getting deleted only in the script run for new level 0 backup.
The main reason for this is that The archivelog that is run every 30 minutes is taking up 0.03G in each run. Even though the total memory space is not getting over 10 G , I am getting error for directories autobackup/archivelog/backupset in FRA after the total memory goes over 5G.

ORA-19502: write error on file "/home/oracle/app/oracle/fast_recovery_area/ORCL/backupset/2016_10_31/o1_mf_annnn_HOT201610311600_INCR_d1h8p42t_.bkp", block number 245761 (block size=512)
ORA-27072: File I/O error
which is getting resolved on clearing the fra space.

Questions:

1. Is manual deletion of unix directories a good idea as this strategy I feel would not consider unsuccessful new level 0 backup .Do we have any other method to delete the previous level 0 and archive log onward once successful new level 0 backup is done.
I tried deleting the RMAN delete syntax with 'until time ' parameter. But thought it would be similar and would not check if new level 0 back up is successful.

2. I have set the FRA to 10 G .By increasing it to 15 G , I was thinking I could delete the backup and archivelogs only older than 2 days(keeping one old set of level 0) instead of 1 day.
Please guide me with how can we decide how much the FRA memory can be .


Please help me with the above questions.
Connor McDonald
November 16, 2016 - 4:45 am UTC

1. Is manual deletion of unix directories a good idea as this strategy I feel would not consider unsuccessful new level 0 backup .Do we have any other method to delete the previous level 0 and archive log onward once successful new level 0 backup is done.


Check out the "redundancy" option. You can nominate the number of redundant copies you have. I dont recommend deleting things from the OS level, or if you do, you need to let rman know with the appropriate crosscheck commands.

2) FRA can be as large as you want, but of course, you need to have sufficient disk space on your system to accommodate it.

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.