Home » RDBMS Server » Backup & Recovery » How to backup incremental backup
How to backup incremental backup [message #185858] Thu, 03 August 2006 19:44 Go to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Hi gurus,

I have a question for you may be this is simple But i want to make sure with you gurus before putting to management.

We have 4hours SLA for the database recovery. means in worst case we can only lose 4 hours data.

My problem is our database is not heavily used and there is no archive logs be written.

I am backing up my full database using RMAN every night 2am. I am thinking to do incremental backup every 4 hours. But question is there is no archive logs written on disk. I have 3 redologs files of 100 M each.
When i have run
SQL> alter system switch logfile;
It is writting the archive logs.

Could please someone suggest me what is better way to do the backup that covers 4 hours SLA.

Thank you in advance.

Regards
Rupi
Re: How to backup incremental backup [message #185861 is a reply to message #185858] Thu, 03 August 2006 20:54 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You mention that your database is NOT heavily used and that not many archivelogs are being generated. That being the case, I would stick with the nightly full backups and forget about the incremental backups. 4 hour SLA is more than sufficient for your situation. If needed, your longest point of recovery would be copying the backups from disk or tape in order to recover.
Re: How to backup incremental backup [message #185871 is a reply to message #185861] Thu, 03 August 2006 23:35 Go to previous messageGo to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Thanks Brian for your time and reply to my question.

But my question is if the server is totally crashed in middle of the day. My understanding is that i can only recover upto last backup. But management want the data to be backed up fully upto the point. Worst is we can lose only 4 hours data as per SLA. This is goverment agency so they want everying in papers. How we are doing???

Thanks again for your help

Regards
Rupi
Re: How to backup incremental backup [message #185922 is a reply to message #185871] Fri, 04 August 2006 05:23 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Well are your archive logs on the same system/disk as your datafiles? If not, then you can just recover up to the point of failure using the archive logs. If you archive logs ARE on the same system/disk as your datafiles, then you could schedule a job to copy the archive logs off every hour or so.

An IMPORTANT point is since you don't have a lot of activity on your system, you may also want to perform a ALTER SYSTEM ARCHIVE LOG CURRENT; every hour or so. This will ensure data from the redo logs is flushed to the archive logs. After this, you could perform the copy of the archive logs to another drive.
Re: How to backup incremental backup [message #189982 is a reply to message #185922] Mon, 28 August 2006 19:38 Go to previous messageGo to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Hi ebrian,

Thanks for you help related the incremental RMAN backups.

As you have suggested i have writtenthe script to backup archive logs every 4 hours.
But when i ran fullbackup. Full RMAN backup does not clear the archive logs written by archivelog script every 4 hours.
please find my both scripts and PLEASE suggest. You always help me.

Regards
Rupinder
Re: How to backup incremental backup [message #190211 is a reply to message #189982] Tue, 29 August 2006 13:22 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
From your script, it would appear the the archivelog script run every 4 hours should clear up the archive logs it is backing up. The full backup script should clear up the logs it is backing up.

What version of RMAN are you using and how many archive destinations do you have?
Re: How to backup incremental backup [message #190242 is a reply to message #190211] Tue, 29 August 2006 19:54 Go to previous messageGo to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Thank ebrain for your reply,

I think i am using "delete force noprompt obsolete recovery window of 1 days" in my fullbackup.rcv. My understanding is that it will keep only full database backup for last 2 days.

Even i have deleted "delete force noprompt obsolete recovery window of 1 days" from my archivelogbackup.rcv. But still it is keeping last day one.

please see below.

PROD-sd_db:Be-Careful!$pwd
/rman_bkp/backups/arch
PROD-sd_db:Be-Careful!$ls -l
total 375436
-rw-r----- 1 oracle dba 46019584 Aug 29 01:02 alPRDSD1_t599706146_s1832_p1
-rw-r----- 1 oracle dba 2560 Aug 29 01:02 alPRDSD1_t599706146_s1833_p1
-rw-r----- 1 oracle dba 45653504 Aug 29 11:38 alPRDSD1_t599744337_s1834_p1
-rw-r----- 1 oracle dba 58997248 Aug 30 01:03 alPRDSD1_t599792601_s1840_p1
-rw-r----- 1 oracle dba 2560 Aug 30 01:03 alPRDSD1_t599792601_s1841_p1
-rw-r----- 1 oracle dba 41396224 Aug 30 10:47 alPRDSD1_t599827662_s1842_p1
PROD-sd_db:Be-Careful!$


see the timings. I have ran manually archivelogbackup.sh on 29th at 11.38 and i have ran today again on 30th Aug at 10.47. But still it is not deleted the old archive log.
as you can see i am running my full backup script at 1am everynight.

Please suggest.

Regards
Rupinder
Re: How to backup incremental backup [message #190340 is a reply to message #190242] Wed, 30 August 2006 05:22 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
The archivelogbackup.sh script has a recovery window of 2 days, therefore this will maintain two days worth of backupsets for archivelogs. You may want to change this since your full backup script has a recovery of 1 day already.

Even with your nightly full backup's recovery window of 1 day, depending on exactly what time it runs, it may not delete the backupsets. (ie. it may not cross that threshold to consider it 1 day old).
Re: How to backup incremental backup [message #190457 is a reply to message #190340] Wed, 30 August 2006 19:29 Go to previous messageGo to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Hi ebrain,

This is what i have configured yesterday and changed my archivelogbackup.rcv as below
run
{
allocate channel d1 type disk format '/rman_bkp/backups/arch/al%d_t%t_s%s_p%p';

sql 'alter system archive log current';
backup
(archivelog all
delete input);
release channel d1;

}


I am not using any recovery window now.

I am planning to run backuparchivelog.sh like
#0 4,7,10,13,16,19,22 * * * /rman_bkp/backups/scripts/SDbackuparchivelog.sh
and fullbackup on

0 1 * * * /rman_bkp/backups/scripts/fullbackupall.sh

As i have changed the recovery wondow to 0day. still my fullbackup is not clearing the arcvhive logs. But you are right the archive logs files are only for last day only.

My understanding is When we run RMAN Fullbackup it will clear all the backup archive logs.

Thanks again for your help.
Really appreciated your time. I am also looking on metalink to find the answer!!

Warm Regards
Rupi





Re: How to backup incremental backup [message #190578 is a reply to message #190457] Thu, 31 August 2006 05:36 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
The DELETE INPUT will delete the actual archive logs the job backs up. The RECOVERY WINDOW will remove any obsolete backupset of archive logs. Once the backup is complete, if you run 'REPORT OBSOLETE' is anything listed?

With a RECOVERY WINDOW of 1 day, it is expected to have today's backup and yesterday's backup remaining after a DELETE OBSOLETE. Are you saying that you see more than that remaining? And you are talking about the archive backupsets and NOT the actual archive logs themselves...right?
Re: How to backup incremental backup [message #190701 is a reply to message #190578] Thu, 31 August 2006 19:20 Go to previous messageGo to next message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Thanks ebrain for nice explanation.

you are right there is only 2days full backup remaining on disk and it is deleted all the backups older than 2 days.

My question is when i do archivelog backup every 4 hours writting on the disk. All the archivelogs must be cleared when the fullbackup script runs to backup full database at 1am night.

But i can see still the archivelogs backset remaing for 1 day on disk.
I am wondering it shold be cleared or not. When we ran full backup.

Thanks again for your time really appreciated.

Warm regards
Rupi
Re: How to backup incremental backup [message #190937 is a reply to message #190701] Sat, 02 September 2006 15:02 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Since you have removed the delete obsolete...recovery window command from the archive backup script, backups will be removed with the delete obsolete...recovery window command in the full backup script. The delete obsolete command will manage the removal of all database backupsets including archivelog backupsets. If you have it set to RECOVER WINDOW 1 DAY, then you'd expect to see the 2 days worth remaining.

The backupsets for both of the archivelogs and the database must be kept in order to cover the recovery window you specify. Therefore, that's why you are seeing the archivelog backupsets in addition to the database backupsets.

Hope this helps.
Re: How to backup incremental backup [message #191124 is a reply to message #190937] Mon, 04 September 2006 21:24 Go to previous message
rmalhi
Messages: 42
Registered: May 2006
Location: Australia
Member
Thanks Ebrain for the explanation.
I understood now more about RMAN.
Thanks for your all the help

Warm Regards
Rupi
Previous Topic: Recovery full database
Next Topic: Migration of Solaris Oracle9i to Windows Oracle9i
Goto Forum:
  


Current Time: Tue Dec 06 04:14:04 CST 2016

Total time taken to generate the page: 0.14295 seconds