Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Paul.

Asked: June 28, 2002 - 7:38 am UTC

Last updated: September 07, 2021 - 7:10 am UTC

Version: 8.1.7

Viewed 10K+ times! This question is

You Asked

Hi,

I have read quite a bit on Oracles RMAN utility and know that for hot backups RMAN doesn't use old method of placing tablespaces in Archive log mode freezing datafile headers & writing changes to Redo/ Archive logs. Hence a company with a large DB shouldn't experience the usual overhead of extra redo during a hot RMAN backup. With this in mind why does Oracle need the database to operate in archive log mode for hot backups via RMAN, what exactly are the logs being used for?

Paul.

and Tom said...

You have confused some terms.

RMAN doesn't place tablespaces into BACKUP MODE. A database is in archivelog mode (or not), not a tablespace.

We need a database to be in archive log mode for hot backups (regardless of whether you use RMAN or the old fashioned way). We need this because the copies of the files we make during this time are "fuzzy" or inconsistent. We need the archived redo logs to make the consistent again.

Rating

  (49 ratings)

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

Comments

redologs & RMAN

A reader, June 28, 2002 - 8:44 am UTC

I have read that the extra redo involved with old style backups is no longer present in RMAN, from your answer you are saying that redo information is written to the logs while the datafile is backed up & would be needed to roll forward in advent of a recovery. Is the redo log written during a RMAN backup the same or a lot less or none at all?

Tom Kyte
June 28, 2002 - 8:52 am UTC

When you put a tablespace into backup mode -- that will cause the first change to a block to log the entire block, instead of just the changes to the block.

Redo is otherwise generated as normal.

During a RMAN hot backup, since it doesn't put the tablespace into backup mode, redo is just generate "as normal". The full block isn't logged upon the first change while backing up.

channel and backupset

Reader, June 28, 2003 - 12:51 pm UTC

If I allocated three channels for backup, say my database contains 9 datafiles, how will the channels be used? My understanding is as follows with regard to BACKUPSET. Please correct me if i am wrong. Thanks.

(1) A channel (process) will backup a datafile at a time. Three channels will copy three datafiles independently at a time.
(2) If I have specified FILESPERSET as 3, then a channel will be allocated for a backupset. In my case, one channel will copy three data files, one at a time, until it creates a backupset with three datafiles. At the samet time, second and third channels will be doing the same with other backupsets.
(3) Is allocating multiple channels same as parallel query/DML in the sense that it will be useful only with multiple cpu machine.
(4) What is the limit of number of channels I can allocate? I understand that it depends on number of data files and also does it depend on number og CPUs?
(5) Is the concept of allocating channels the same with regard to taking image copies and also archived redolog backups?

Thanks as always. I learn so much from you.

Tom Kyte
June 28, 2003 - 8:25 pm UTC

1) a channel will backup some piece of data in a serial fashion, yes. three channels may copy three streams of database data.
2) well, you allocated the channels yourself? but yes.
3) similar, same concept but since IO and rman processing is generally not cpu intensive, it works well on single cpu machines -- given you have the BANDWIDTH to support it (IO)
4) it has practical limits -- based on the number of inputs and output devices and how much you have to backup, yes. cpu is of less relevance here.
5) you might want to read:

</code> http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96566/rcmconc1.htm#462102 <code>

for background info.

Persistent Config

Reader, June 29, 2003 - 11:28 am UTC

(1) If I do not use a catalog, where my persistent configurations that I set using CONFIGURE command are stored. If they are recorded in the target database controlfile, will control_file_record_keeping_time decide how long these configurations remain persistent? In other words, will the configuration details get overwritten based on control_file_record_keeping_time parameter?
(2) If I use a catalog, will RMAN use the catalog by default to find info regarding what to restore and what to recover? Is it like, if catalog does not contain enough info for RMAN, will RMAN get the info from the controlfile? or if I used catalog, RMAN will only use my catalog not the controlfile during its operation?

THANKS so much for your time. You are the best.

Tom Kyte
June 29, 2003 - 12:08 pm UTC

1) see
</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmquick.htm#442236 <code>

for a caveat about that -- if you lose the control files... they are gone without a recovery catalog.


these records are not "reusable" in the controlfile, hence they are not controlled or affected by the record keep time.

2) you connect rman to something, be it a recovery catalog or not. that is what tells it where to look.

Thanks

A reader, June 29, 2003 - 1:19 pm UTC


Very Usefull

Prakash Eranki, June 30, 2003 - 5:46 am UTC

Tom
What is your valuable suggestion for my question/doubt

We have a backoffice system with Oracle database.
It has currently two schemas Main and User_data. We are planning upgrade of Backoffice System. The new system has got two oracle instances with version3(similar to existing version) and version4( new version going to migrate). The old version has the schemas named v3Main and v3User_data.
We have 3 sets of Main and User_data schemas in Version3 instance. We need to restore from production at 3 different dates to these 3 different sets of schemas . What is the best way of doing so. Please note that the new instance got the instance name different and new hardware(obviously higer configuration) and same oracle dbversion and different schema names. So what is the best strategy that will work in this situation . Please guide me .

Thanks & Regards

Tom Kyte
June 30, 2003 - 7:17 am UTC

I don't know what you mean by

We need to restore from production at 3 different dates


exactly, are you saying "at 3 different points in time"

are you in archivelog mode
are your backups REAL backups (eg: image backups) not exports.

TAG

Reader, July 09, 2003 - 5:08 pm UTC

Tom, when I did the backup of datafile using rman copy command, I have specified the tag. However, when I used LIST COPY command, I could not see the tag that I specified. Could you please help me which command I should use to view the tags assoiciated with copy command. THANKS.

Tom Kyte
July 09, 2003 - 7:50 pm UTC

list backup;

list backup does not show!

Reader, July 10, 2003 - 8:51 am UTC

Tom, please see below. It shows tag for backupset but not for image copy. Thanks for your time.

user ksh > rman

Recovery Manager: Release 9.2.0.1.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

RMAN> connect target;

connected to target database: U439 (DBID=411229649)

RMAN> backup tablespace users
2> format '$HOME/BACKUP/RMAN/df_%d_%s_%p.bus' tag='users_backupset';

Starting backup at 09-JUL-03
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/home3/user439/ORADATA/u03/users01.dbf
channel ORA_DISK_1: starting piece 1 at 09-JUL-03
channel ORA_DISK_1: finished piece 1 at 09-JUL-03
piece handle=/home3/user439/BACKUP/RMAN/df_U439_3_1.bus comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 09-JUL-03

RMAN> list backupset;


List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 64K DISK 00:00:00 09-JUL-03
BP Key: 1 Status: AVAILABLE Tag: USERS_BACKUPSET
Piece Name: /home3/user439/BACKUP/RMAN/df_U439_3_1.bus
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
3 Full 100022 09-JUL-03 /home3/user439/ORADATA/u03/users01.dbf

RMAN> copy datafile '$HOME/ORADATA/u03/users01.dbf'
2> to '$HOME/BACKUP/RMAN/users01.cpy' tag='users_copy';

Starting copy at 09-JUL-03
using channel ORA_DISK_1
channel ORA_DISK_1: copied datafile 3
output filename=/home3/user439/BACKUP/RMAN/users01.cpy recid=1 stamp=498929601
Finished copy at 09-JUL-03

RMAN> list copy;

specification does not match any archive log in the recovery catalog

List of Datafile Copies
Key File S Completion Time Ckp SCN Ckp Time Name
------- ---- - --------------- ---------- --------------- ----
1 3 A 09-JUL-03 100022 09-JUL-03 /home3/user439/BACKUPy


RMAN> list backup;

using target database controlfile instead of recovery catalog

List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 64K DISK 00:00:00 09-JUL-03
BP Key: 1 Status: AVAILABLE Tag: USERS_BACKUPSET
Piece Name: /home3/user439/BACKUP/RMAN/df_U439_3_1.bus
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
3 Full 100022 09-JUL-03 /home3/user439/ORADATA/u03/users01.dbf

RMAN> list copy;

specification does not match any archive log in the recovery catalog

List of Datafile Copies
Key File S Completion Time Ckp SCN Ckp Time Name
------- ---- - --------------- ---------- --------------- ----
1 3 A 09-JUL-03 100022 09-JUL-03 /home3/user439/BACKUPy

RMAN>

Tom Kyte
July 10, 2003 - 10:08 am UTC

don't know, don't do image copies. Look at the rman catalog views, it is probably in there somewhere.

in NOCATALOG mode, how do i get the info.

Reader, July 10, 2003 - 5:29 pm UTC

RC_DATAFILE_COPY has a column for tag. However, if i don't use the catalog, how to get the tag value for image copies? Thanks.

Tom Kyte
July 11, 2003 - 7:21 am UTC

look right above at my last response "don't know, don't do image copies myself"

not much benefit in rman without the recovery catalog doing image copies.

When should I use image copies

Reader, July 12, 2003 - 2:19 pm UTC

Tom, in what situations creating image copies more useful than backupsets? should my backup strategy include image copies? Thanks.

Tom Kyte
July 12, 2003 - 2:46 pm UTC

they are of limited use. You might use them if you were a really big system using something like split mirrors to backup with.

split mirrors and RMAN

Reader, July 12, 2003 - 3:43 pm UTC

In splitting mirror and then use the mirror for backup for example in EMC, where does RMAN come into picture? Is it like, after I made a backup using OS utility from the split mirror, I use RMAN to register the copy with RMAN repository? Could you please elobarate on this? Thanks.

Tom Kyte
July 12, 2003 - 6:38 pm UTC

yes, that is where it could come in. it is of somewhat limited use in that configuration.

Point intime recovery untile time

Reddy, July 24, 2003 - 8:09 am UTC

Hi Tom

I am practicing various scenarios for backup and recovery using RMAN. I want recover database using untile time.
I gave following command
RMAN>run
{ allocate channel c1 type disk;
set until time ='2003-07-24:11:00:00';
restore database;
recover database;
sql "alter database open resetlogs"; }
but this is not able recover and giving date error.
I have altered my session in target database for matching above date format. Can you tell me how to recover database using UNTILE time clause. I have gone through oracle mannual all in vain.

Thanks

Reddy

Tom Kyte
July 24, 2003 - 8:56 am UTC




and the error you are getting is?
and your NLS_DATE_FORMAT setting is?






SCN is more reliable

Dana Day, July 24, 2003 - 7:26 pm UTC

I find until SCN better than until time, with log_seq in the middle. Until time is still going to use (ultimately) an SCN to recover to.

Tom Kyte
July 25, 2003 - 7:03 am UTC

scn is more "precise" then time, yes. more reliable? not really.

if you know the scn, it would be preferred. if not, time is fine.

Reddy...NLS date

Brent, July 25, 2003 - 10:08 am UTC

Reddy,

One thing you can try:

set until time "to_date('Oct 16 2000 15:30:00','Mon DD YYYY HH24:MI:SS')";

This is from metalink, note #: 164521.1



More on the arc redo log files

steve, January 31, 2004 - 10:20 am UTC

Hi Tom,

I am confused with how the archived redo log files
are managed when doing RMAN backups

Assume the following
--------------------

1. database has 25 tablespaces/datafiles
2. all datafiles are constantly changing
3. 50 redo log files are generated per day (50*200Mb)
4. Backup redundancy of 2
5. Backups done as follows:

Sun --> FULL
Mon - Wed - Fri --> incremental

I can visualize what used to happen in traditional hot
backups. If we did a full every Sunday, we would have
something like:


On Sunday: copy 25 data files D1
During the week: Keep 7*50 arc redo lg files R1

On next Sunday: copy 25 data files D2
During the week: Keep 7*50 arc redo lg files R2

On next Sunday: copy 25 data files D3
Delete A1 and R1
During the week: Keep 7*50 arc redo lg files R3

On next Sunday: copy 25 data files D4
Delete A2 and R2
During the week: Keep 7*50 arc redo lg files R4


With RMAN, I don't understand how to manage
the archived redo log files:

Full on Sunday --> creates backup set B1.1

incr on Mon --> creates backup set B1.2

incr on Wed --> creates backup set B1.2

incr on Fri --> creates backup set B1.3



Full on Sunday --> creates backup set B2.1

incr on Mon --> creates backup set B2.2

incr on Wed --> creates backup set B2.2

incr on Fri --> creates backup set B2.3



Full on Sunday --> creates backup set B3.1


Q1: At this point (right after B3.1), woudl B1.1
to B1.4 all be considered obsolete?

Q2: (and here is where I am having the difficulty)
What do I do with the 350 arc redo log files
that are generated during the week?

q. How do I handle the arc redo log files? Does RMAN
backup all 350 arc redo log files generated during
the week?

q. Does RMAN copy all them from the arc destination
to the backup destination?

q. Who/how/when are they copied/deleted?

Help!


I could really use some clarification on the 'lifecycle'
and 'movement' of the arc redo log files.

Note: This will also help me properly dimension my
disk based (ATA drive) backup solution! ;)


Steve



Tom Kyte
January 31, 2004 - 10:31 am UTC

well -- i don't see how you can sleep at night with only one full backup?

I need at least 3, if not many more, to be comfortable.

You want to keep the archives all of the way back to your oldest backup -- in your case, everything from sunday on.

That way -- you can restore sunday and be OK.

you can restore sun apply mon incremental and still be OK.

and so on. If wed's incremental is on a bad tape -- no worries, you haven't cut off any archives you need.


So, look at your OLDEST backup, keep all archives back to that point in time at least.

(and keep more than one backup of course!)

steve, January 31, 2004 - 11:38 am UTC

I knew you were gonna comment on the "keeping only one backup
set". I just wanted to make the example shorter.

But Tom, I still don't know how to handle the archived
redo log files. Would it be through RMAN or separately?



Steve

Tom Kyte
January 31, 2004 - 12:09 pm UTC

you could use rman to back them up -- that would be easiest (they would be known to rman) or you can back them up yourself. I would back them up via rman to keep everything "together"

</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmconc1.htm#465607 <code>

Thanks

steve, January 31, 2004 - 12:13 pm UTC

Thanks Tom

Something I though about

steve, February 03, 2004 - 11:44 am UTC

Hi again,

I was thinking about something...

Suppose:
========

1. We will never want to roll back the database (i.e.
recovery window is 0).

2. We want backups merely to protect against
media failure.

3. We are backing up to local disks (i.e. fast)

4. Assume incrementals take as long or longer
than full backups.

Since we should to keep 3 sets of backups and since
incrementals are as long to take as full backups (smaller but longer),
do you see a use to doing incrementals? Why not just
perform a FULL wherever we were performing an incremental.

In the end, we will actually need less storage space.
I don't see the need for the incrementals in this situation.

I'd love to hear your comments on this.

Steve



Tom Kyte
February 03, 2004 - 1:49 pm UTC

if you got the disk -- the fulls are what you want -- since you want 3 fulls regardless (and you want them on tape! or at least "elsewhere").

the incrementals in 9i and before are purely for "saving space" pretty much.

In 10g -- this all changes with the ability for rman to catch up your backups and for the incremental to read ONLY changed blocks instead the entire database...

Great! Thanks Tom.

steve, February 03, 2004 - 2:17 pm UTC

Great! Thanks Tom.

Neat about incrementals catching up the full in 10G.

Not sure how we will maintain 3 copies in the 10G scenario,
but I guess we'll cross that bridge when we get there...

Thanks again

Steve

rman and archivelogs timing - 0racle 9.2

BAQIR HUSSAIN, February 19, 2004 - 2:04 am UTC

Tom,
rman was setup first time and ran the following to backup data files and archive logs. I started archiving datafile at 9pm and done by 10:30pm. When the time to backup archive logs, the rman asks for the very first archive log generated a few days back. My questions are:

1. Why rman is asking for the very old archive logs?
2. Since the rman backup was done on the datafiles at 9pm,therefore, rman should only backup those archive logs that were generated before and during the backup started for the roll forward.
3. How can I direct RMAN to backup only those archive logs that are generated before and during the rman backup run?
4. I feel like I am not supplying the right parameters to achieve. Please show me how can I do it?

Thanks


3> run {
4> allocate channel c1 type disk;
5> allocate channel c2 type disk;
6>
7> backup
8> incremental level 0
9> tag sun_bkup_level_0
10> format '/mnt/dump/db_file_bkup/df_%u'
11> database;
12>
13> sql 'alter system archive log current';
14>
15> backup
16> format '/mnt/dump/db_file_bkup/al_%u'
17> archivelog all
18> delete all input;
19> }

Tom Kyte
February 19, 2004 - 10:54 am UTC

it wanted what was in the control file but it had no record of having. it is asking to backup that which has not been backed up.

...
should only backup those archive logs that were generated before and during the
backup started for the roll forward.....

"before", it got them, it got them all ;)

see
</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmquick.htm#440801

and specifically:

http://docs.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmbackp.htm#441460 <code>



delayed delete of backed up archivelogs from rman

Rory Concepcion, May 07, 2004 - 3:21 am UTC

Hi Tom,

It's been a while since I was able to post a question in
your site. My question is, We have daily backup of archivelogs.
In RMAN, it looks like this:

run{
allocate channel c1 type disk format '/backup/ZIP/al_%u_%s_%p';
backup archivelog all delete input;
}

Now with this setup, archivelogs that are backed up will
automatically be deleted after backupset. What if I removed
the delete input option coz I dont want my archivelogs to
be deleted during that time but on a latter time. Is there
a command in RMAN that will delete the archivelogs that are
included in the backupset? Thanks a lot.


Tom Kyte
May 07, 2004 - 8:20 am UTC

you'd use something like list backup of archivelog all; or a query against the recovery catalog so you can delete what you like.

RMAN-06059: expected archived log not found, lost of archived log compromises recoverability

pingu, June 11, 2004 - 5:09 am UTC

Hi

I just created a rman catalog 10g and trying to backup a database which is 10g as well.
When I run this command

RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG
2> TAG = TEST1
3> FORMAT = '/u04/backup/TEST/%d%Y%M%D%U';

I get
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /tmp/DSIM_archive/DSIM_526090839_1_517.arc

I dont understand, the latest archive log sequence is

select max(recid) from v$log_history;

MAX(RECID)
----------
719

I dont understand why RMAN tries to backup archive log from 2 days ago? I mean what is the use even you backup those arhived logs without any previous backup (I am making this database first backup)?

How can we get rid of this error message


Tom Kyte
June 11, 2004 - 3:51 pm UTC

[tkyte@localhost admin]$ cd
[tkyte@localhost tkyte]$ oerr rman 6059
6059, 1, "expected archived log not found, lost of archived log compromises recoverability"
// *Cause: The archived log was not found. The repository thinks it does
// exist. If the archived log has in fact been lost and there is
// no backup, then the database is no longer recoverable across
// the point in time covered by the archived log.
// This may occur because the archived log was removed by an
// outside utility without updating the repository.
// *Action: If the archived log has been removed with an outside utility
// and the archivelog has already been backed up, then you can
// synchronize the repository by running CROSSCHECK ARCHIVELOG ALL.
// If the archivelog has not been previously backed up, then you
// should take a full backup of the database and archivelogs to
// preserve recoverability. Previous backups are not fully
// recoverable.

just don't backup the archive logs here if this is your first backup.

What I dont understand ius why it looks for those logs

Pingu, June 12, 2004 - 5:43 am UTC

Hi

I understand RMAN looks for those logs because it has them recorded in the repository as not backed up. But I dont understand, if I am backing up a database with max scn 1000 why it look for archived logs with scn < 1000 when they are not needed at all??? (The 1000 is just an example)

Tom Kyte
June 12, 2004 - 9:50 am UTC

you asked to backup archive logs.
they were recorded in the control files.
it is just doing what you asked it to do.

Auto delete from Archive log

Nags, June 08, 2005 - 1:34 pm UTC

Is there a way by which the archivelog can be deleted automatically, after they expire, without running any jobs ? Why isn't such an option provided in the archive log process itself ? I think it makes sense. I doesn't fill up the disk space, and no manual intervention is required.

Tom Kyte
June 08, 2005 - 1:52 pm UTC

umm, you sort of need to get the archives OFF your system before they can be deleted.

The thing that gets them OFF can safely remove them, nothing else can.

most people get them off of their system very quickly (else they do not provide much protection) and you can use whatever process that is to remove them from the file system as well if you like)

Auto delete from Archive log

Nags, June 08, 2005 - 2:49 pm UTC

This is the scenario we have.

All archive logs and backups go to one drive. The retention policy is 1 Week. The tape backup process backs up all files on that drive. Now we have to schedule a separate job to delete all the old files. If all expired backups get deleted automatically, we need not schedule a seperate job.


Tom Kyte
June 08, 2005 - 4:57 pm UTC

but the backups are on tape, the stuff on disk -- you can clean that up as they are backed off to tape.

backup archivelog delete all input;

Logan Palanisamy, June 08, 2005 - 3:09 pm UTC

Why not use "backup archivelog delete all input;"

Here is what the documentaion says about DELETE INPUT


deletes the input files upon successful creation of the backup set. Specify this option only when backing up archived logs, datafile copies, or backup sets. It is equivalent to issuing DELETE for the input files.

The ALL option applies only to archived logs. If you run DELETE ALL INPUT, then the command deletes all copies of corresponding archived redo logs or datafile copies that match the selection criteria. For example, if you specify the SEQUENCE n clause, then RMAN deletes all archive logs with same sequence number n, including duplicate archived logs (that is, logs with same log sequence number and thread).

Note: The BACKUP ARCHIVELOG command only backs up one copy of each distinct log sequence number, so if the DELETE INPUT option is used without the ALL keyword, RMAN only deletes the copy of the file that it backs up.

crosscheck archivelog all Vs change archivelog all validate;

Nathan, June 24, 2005 - 1:37 pm UTC

Tom ,

After reading up the Oracle documents and metalink threads I got myself confused.

A script in our database deletes old archive log files and I'm implementing RMAN backup ( currenly setting up dataguard so backing up by 300Gig database as I key this in ). I had kicked of the backup command in parallel to the crosscheck archivelog all command. Now should I issue any command to delete expired archive log to delete the entries ?

Somewhere I read change archivelog all validate would help.

Is crosscheck archivelog all different from change archivelog all validate ? Should these commands be followed up by any other commands to ensure that "backup archivelog all" works properly?

Thanks and Best Regards

Moved Archive logs & ora-19625

Vinnie, August 10, 2005 - 11:35 am UTC

I have the following scenario:

My archive log dir filled up to the point where it hung the database. Another DBA moved a portion of the archive logs to another partition to free up the hang.

My question is, how can I get RMAN to backup the dB & the logs with them in 2 different locations? Is this possible? Is it possible to have RMAN skip certain logs?

two mountpoints for the RMAN to check ( archive mt pts)

Pravesh Karthik from India, October 27, 2005 - 12:44 am UTC

connect target rmansys/xxxx@sbldb;
connect catalog rmang/xxxx@rman;
run
{
allocate channel tape2 type 'SBT_TAPE' parms
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.SAS3SD1.opt)';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_13214_1_571627533.arc';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_13215_1_571627533.arc';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_13216_1_571627533.arc';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_13217_1_571627533.arc';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_13218_1_571627533.arc';
catalog archivelog '/oracle/backup/sbldb/arch/sbldb_15186_1_571627533.arc';
backup archivelog all delete input;
}


Tom,
I use the above command to say rman to backup the archives, when i move the arc files from the
archives destination directory.

My question is, Can we issue two mountpoints for the RMAN to check? so that the files can be at either of the locations?

Thanks for your consideration.
Pravesh Karthik

RMAN> backup archivelog all delete input;

Dawar, February 10, 2006 - 1:27 am UTC

Tom,

DB: 10.1.0.4.0

" RMAN> backup archivelog all delete input; "

When our redolog files become full and cause Database down we run this script.

Is it normal process?

OR

what could be done to make it better?

Next step I am thinking to setup cron job for this command.
So it can run after every 48 hours. is it ok?

Please give your feed back. thanks

Regards,
Dawar

Tom Kyte
February 10, 2006 - 12:41 pm UTC

your redo log files are not "full", your archive space appears to be full and you cannot archive anymore redo there.

In short, you have either

a) configured insufficient space for your archive destination
b) not really considered your backup/recover policy (you need to be getting your archives off of the main system to something else - they are there to recover your backups with, if the entire machine goes "away", you'll need these files to recover with)

So, what is your backup and recovery policy here - you need to manage archives, you need to have planned to manage archives. They are a crucial bit in your ability to perform media recovery.



RMAN> backup archivelog all delete input;

Dawar, February 11, 2006 - 1:02 pm UTC

Tom,

Before I have read your above feed back, I have setup cron job to performed RMAN> backup archivelog all delete input;

Here what I got in my log file.
Please give your feed back.

Recovery Manager: Release 10.1.0.4.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle. All rights reserved.

RMAN>
connected to target database: SIDNAME (DBID=XXXXXXXX)
using target database controlfile instead of recovery catalog

RMAN>
Starting backup at 10-FEB-06
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=269 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=268 devtype=DISK
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=5701 recid=2412 stamp=581958928
input archive log thread=1 sequence=5702 recid=2413 stamp=581961105
input archive log thread=1 sequence=5703 recid=2414 stamp=581964532
input archive log thread=1 sequence=5704 recid=2415 stamp=582025325
input archive log thread=1 sequence=5705 recid=2416 stamp=582029976
input archive log thread=1 sequence=5706 recid=2417 stamp=582031922
channel ORA_DISK_1: starting piece 1 at 10-FEB-06
channel ORA_DISK_2: starting compressed archive log backupset
channel ORA_DISK_2: specifying archive log(s) in backup set
input archive log thread=1 sequence=5707 recid=2418 stamp=582037207
input archive log thread=1 sequence=5708 recid=2419 stamp=582038471
input archive log thread=1 sequence=5709 recid=2420 stamp=582043538
input archive log thread=1 sequence=5710 recid=2421 stamp=582048518
input archive log thread=1 sequence=5711 recid=2422 stamp=582055205
channel ORA_DISK_2: starting piece 1 at 10-FEB-06
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
12
ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
blocksize=512)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 28: No space left on device
Additional information: -1
Additional information: 1048576
channel ORA_DISK_1 disabled, job failed on it will be run on another channel
RMAN-03009: failure of backup command on ORA_DISK_2 channel at 02/10/2006 18:00:
12
ORA-19502: write error on file "/u02/backup/6fhb2t97_1_1", blockno 6145 (blocksize=512)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 28: No space left on device
Additional information: -1
Additional information: 1048576
channel ORA_DISK_2 disabled, job failed on it will be run on another channel
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/10/2006 18:00:
12
ORA-19502: write error on file "/u02/backup/backup_6ehb2t97_1_1", blockno 6145 (
blocksize=512)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 28: No space left on device
Additional information: -1
Additional information: 1048576

RMAN>

Recovery Manager complete.

Tom Kyte
February 11, 2006 - 2:39 pm UTC

you ran out of space? disk is full. seems clear?


ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 28: No space left on device

Additional information: -1
Additional information: 1048576

RMAN> backup archivelog all delete input;

Dawar, February 14, 2006 - 10:23 pm UTC

Tom,

You are correct.
We transferred files via (FTP) to other (backup) server.

Now this error is not coming.
After running

RMAN> backup archivelog all delete input;

Related to above I have this question.

I wanted to setup cron job to do following steps in one script.

RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;

RMAN> BACKUP;

RMAN> backup archivelog all delete input;

RMAN> delete obsolete;

My question is that is it right sequence to do backup?

Please give your comments on it.

Regards,
Dawar


Tom Kyte
February 15, 2006 - 8:42 am UTC

well, when you tested the restoration on your test machine, did all go well (that would be a fairly "good first test"). Because you will do that - restore this backup on a test machine.


You probably want a switch log in there, in order to have everything in your backup set you need to restore a consistent copy of the database with

</code> http://docs.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup003.htm#i1006286 <code>



ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk,

Dawar, February 15, 2006 - 11:59 am UTC

Tom,

I have put following code in my sh script to run via cron job.


. $HOME/.profile
export ORACLE_SID=sid
rman nocatalog << EOF
connect target
configure controlfile autobackup on;
backup database plus archivelog delete input;
delete obsolete;
yes
EOF

Do we need to add " ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;".

If yes, why and if no why not?

Actually I have two different opinions.for
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk,

1)

You shouldn't need to use ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk, it should be already configured by default. You can check that by :

RMAN> show all;

2)

You will find that the 'delete obsolete' command will fail if it isn't there. At least it will if you run it interactively. The backups will work though. I suspect there is a bug in there somewhere.



Regards,
Dawar



RMAN-03009: failure of backup command on ORA_DISK_1 channel

innocent, January 23, 2007 - 6:35 am UTC

Pls kindly help me with this. i can't do my backup. i have Oracle E-business suite 11i, 9i on HP-UX platform. this are the errors i got when using RMAN.

RMAN> startup mount;

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area 598700600 bytes

Fixed Size 737848 bytes
Variable Size 419430400 bytes
Database Buffers 167772160 bytes
Redo Buffers 10760192 bytes

RMAN> backup database;

Starting backup at 23-JAN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00012 name=/oracle/oratest/testdata/undo01.dbf
input datafile fno=00019 name=/oracle/oratest/testdata/a_ref01.dbf
input datafile fno=00015 name=/oracle/oratest/testdata/a_media01.dbf
input datafile fno=00001 name=/oracle/oratest/testdata/system01.dbf
input datafile fno=00002 name=/oracle/oratest/testdata/system02.dbf
input datafile fno=00003 name=/oracle/oratest/testdata/system03.dbf
input datafile fno=00004 name=/oracle/oratest/testdata/system04.dbf
input datafile fno=00005 name=/oracle/oratest/testdata/system05.dbf
input datafile fno=00010 name=/oracle/oratest/testdata/system10.dbf
input datafile fno=00011 name=/oracle/oratest/testdata/system11.dbf
input datafile fno=00020 name=/oracle/oratest/testdata/a_ref02.dbf
input datafile fno=00021 name=/oracle/oratest/testdata/a_summ01.dbf
input datafile fno=00022 name=/oracle/oratest/testdata/a_txn_data01.dbf
input datafile fno=00023 name=/oracle/oratest/testdata/a_txn_data02.dbf
input datafile fno=00024 name=/oracle/oratest/testdata/a_txn_data03.dbf
input datafile fno=00025 name=/oracle/oratest/testdata/a_txn_ind01.dbf
input datafile fno=00026 name=/oracle/oratest/testdata/a_txn_ind02.dbf
input datafile fno=00027 name=/oracle/oratest/testdata/a_txn_ind03.dbf
input datafile fno=00028 name=/oracle/oratest/testdata/a_txn_ind04.dbf
input datafile fno=00014 name=/oracle/oratest/testdata/a_int01.dbf
input datafile fno=00006 name=/oracle/oratest/testdata/system06.dbf
input datafile fno=00007 name=/oracle/oratest/testdata/system07.dbf
input datafile fno=00008 name=/oracle/oratest/testdata/system08.dbf
input datafile fno=00009 name=/oracle/oratest/testdata/system09.dbf
input datafile fno=00013 name=/oracle/oratest/testdata/a_archive01.dbf
input datafile fno=00029 name=/oracle/oratest/testdata/a_txn_ind05.dbf
input datafile fno=00017 name=/oracle/oratest/testdata/a_queue01.dbf
input datafile fno=00018 name=/oracle/oratest/testdata/a_queue02.dbf
input datafile fno=00031 name=/oracle/oratest/testdata/odm.dbf
input datafile fno=00032 name=/oracle/oratest/testdata/olap.dbf
input datafile fno=00034 name=/oracle/oratest/testdata/portal01.dbf
input datafile fno=00035 name=/oracle/oratest/testdata/oem_repository.dbf
input datafile fno=00016 name=/oracle/oratest/testdata/a_nolog01.dbf
input datafile fno=00030 name=/oracle/oratest/testdata/ctxd01.dbf
input datafile fno=00033 name=/oracle/oratest/testdata/owad01.dbf
channel ORA_DISK_1: starting piece 1 at 23-JAN-07
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/23/2007 11:35:18
ORA-19502: write error on file "/oracle/oratest/RM/ora_df612617343_s4_s1", blockno 262017 (blocksize=8192)
ORA-27072: skgfdisp: I/O error
HP-UX Error: 2: No such file or directory
Additional information: 262017

A reader, January 23, 2007 - 10:37 am UTC

RMAN> list copy of database archivelog all;


List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
5180 1 2750 A 19-JAN-07 /ora.dump/archive/orp1/1_2750.dbf
5182 1 2751 A 19-JAN-07 /ora.dump/archive/orp1/1_2751.dbf
5184 1 2752 A 19-JAN-07 /ora.dump/archive/orp1/1_2752.dbf
5186 1 2753 A 20-JAN-07 /ora.dump/archive/orp1/1_2753.dbf
5188 1 2754 A 20-JAN-07 /ora.dump/archive/orp1/1_2754.dbf
5190 1 2755 A 21-JAN-07 /ora.dump/archive/orp1/1_2755.dbf
5192 1 2756 A 21-JAN-07 /ora.dump/archive/orp1/1_2756.dbf
5194 1 2757 A 21-JAN-07 /ora.dump/archive/orp1/1_2757.dbf
5196 1 2758 A 21-JAN-07 /ora.dump/archive/orp1/1_2758.dbf
5198 1 2759 A 21-JAN-07 /ora.dump/archive/orp1/1_2759.dbf
5200 1 2760 A 21-JAN-07 /ora.dump/archive/orp1/1_2760.dbf
5201 1 2761 A 21-JAN-07 /ora.dump/archive/orp1/1_2761.dbf
5202 1 2762 A 21-JAN-07 /ora.dump/archive/orp1/1_2762.dbf
5206 1 2763 A 21-JAN-07 /ora.dump/archive/orp1/1_2763.dbf
5207 1 2764 A 21-JAN-07 /ora.dump/archive/orp1/1_2764.dbf
5209 1 2765 A 21-JAN-07 /ora.dump/archive/orp1/1_2765.dbf
5212 1 2766 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2766.dbf
5213 1 2767 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2767.dbf
5214 1 2768 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2768.dbf
5211 1 2769 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2769.dbf
5215 1 2770 A 21-JAN-07 /ora.dump/archive/orp1/1_2770.dbf
5216 1 2771 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2771.dbf
5217 1 2772 A 21-JAN-07 /orahome/OraHome92/dbs/arch1_2772.dbf
5218 1 2773 A 21-JAN-07 /ora.dump/archive/orp1/1_2773.dbf
5221 1 2774 A 21-JAN-07 /ora.dump/archive/orp1/1_2774.dbf
5223 1 2775 A 21-JAN-07 /ora.dump/archive/orp1/1_2775.dbf
5225 1 2776 A 22-JAN-07 /ora.dump/archive/orp1/1_2776.dbf
5227 1 2777 A 22-JAN-07 /ora.dump/archive/orp1/1_2777.dbf
5229 1 2778 A 22-JAN-07 /ora.dump/archive/orp1/1_2778.dbf
5231 1 2779 A 23-JAN-07 /ora.dump/archive/orp1/1_2779.dbf

Why does it list /ora.dump/archive as location for most of the files whereas for some it lists /orahome/OraHome92/dbs as the location.

Please help us try to understand this.

Restoring archivelog from rman backup pieces without controlfile

Logan Palanisamy, February 07, 2007 - 4:25 pm UTC

Tom,

Is it possible to restore/extract archivelog files from rman backup pieces without controlfile or rman catalog.

Here is my scenario.


target database: 9.2.0.6.0
catalog DB: None
catalog schema: None
rman executable:9.2.0.6.0

We run rman online backup with controlfile autobackup everyday as follows:

RMAN> connect target;
2> show all;
3> # Delete everything but the more recent backup.
4> delete noprompt obsolete redundancy=1;
5> backup database;
6> SQL 'alter system switch logfile';
7> SQL 'alter system switch logfile';
8> backup filesperset 5 archivelog all skip inaccessible delete all input
format '/mnt/localbackup/rman_backup/%d_%T_%s_%p';
9> SQL 'alter system switch logfile';
10> SQL 'alter system switch logfile';
11> exit

It gets backed up to disk before it goes to tape. The backup completed successfully. Since we run the two backup separate backup commands, one for DB and one for archive logs, it created two control files. Here are all the files
generated by rman.

-- backup pieces containing DB files.
MYDB_20070120_4611_1
...
MYDB_20070120_4627_1
c-1686117097-20070120-00 - Controlfile autobackup


-- backup pieces containing archivelogs
MYDB_20070120_4628_1
... ...
MYDB_20070120_4670_1
c-1686117097-20070120-01 - Second controlfile autobackup

For some reason, the second controlfile autobackup "c-1686117097-20070120-01" didn't get backed up to tape. We have been able to restore from the tape everything except for c-1686117097-20070120-01.

My current requirement is to rebuild this database using this backup.

I was able to restore the DB files using c-1686117097-20070120-00. But because of the missing c-1686117097-20070120-01, which contains the information about
archivelog backup, I am not able to restore and apply any of the archive logs even though the backup pieces containing the archivelogs are there. Since we
"delete noprompt obsolete redundancy=1;", the current controlfile doesn't have this information either.

Is there any way to restore the archivelogs just from the backup pieces containing the archivelogs without the catalog information in the controlfile?

If no, is there a way to patch either c-1686117097-20070120-00 or a copy of the current controlfile to reinstate them with the archivelog backup and restore
the archive logs?

Aren't the rman backup pieces self-contained, at least the ones containing archivelogs?

Thanks.

Alexander the ok, June 01, 2007 - 9:55 am UTC

Tom,

How often do you backup archive logs to tape? Say for a non-critical database. Thanks.
Tom Kyte
June 01, 2007 - 1:15 pm UTC

define non-critical.

if you lose X minutes of data, what does it cost you?

the longer you have the archives in one place - on the server it is protecting - the higher the probability you LOSE it upon failure.

Alexander the ok, June 01, 2007 - 1:30 pm UTC

Something like a time tracking system for employees to enter time. Important, but isn't one of the big money maker applications.

I'm just looking for a rough estimate.

e.g. Would it be closer to once a week, once a day, once an hour?
Tom Kyte
June 01, 2007 - 1:36 pm UTC

employees get really mad if you lose their hours.

to them, it is a money maker (their money)

wouldn't it?


if you don't care about the data - do whatever.
if you care about the data, you'll have it getting off of the production server onto something else "soon", fast, quickly - maybe right away (remote archiving)

Alexander the ok, June 01, 2007 - 2:09 pm UTC

Ok, yes I care about the data. So, how do you accomplish this? Do you run cron jobs every hour to back them up? All I could find on "remote archiving" is data guard related stuff. That's for critical systems, I don't mean for that extreme.
Tom Kyte
June 01, 2007 - 2:23 pm UTC

you can multiplex archives - to a network device for example.
you can use data guard if you want
you can cron it
you can enterprise manager and rman it
you can XXXX it - where XXXX is pretty much whatever you want to do...



Delete Imput

Richard, June 15, 2007 - 5:09 am UTC

If I issue the following in RMAN:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE ALL INPUT;

then, should something "bad" happen and the backup fail at the last moment, leading to a corrupted backup set, could the archive redo logs be lost forever? Or is there something "clever" in the way RMAN works that prevents Arch Log deletion until the backup succeeds?

RMAN backup to ensure consistency of sequences

MF, July 31, 2007 - 6:29 am UTC

Hi Tom! My application is using a lot of Oracle sequences in tables and I am wondering which is the best backup to use to ensure the consistency of the sequences.

Currently, I will have errors in my application if I use the exp/imp backup dump as there are people using the applications all the time which caused the sequence number to increase.

Appreciate your advices and good day to you!
Tom Kyte
August 02, 2007 - 9:25 am UTC

the concept is "consistency" with regards to sequences utterly escapes me - not sure what you mean by that.

However, if you are using exp (a data COPY tool, not a backup solution - I pray you are NOT using it as your backup) - you would use

consistent=y


to create the export "as of a single point in time" - so all parent/child tables are exported as of the same instant, so that sequence values are exported as of the same point in time and so on.

and consistent=y only works with NORMAL users, not SYS or SYSDBA - never use sys or sysdba to export with (sys cannot become "read only", a requirement for a consistent export)

Perpetually backing up ARCHIVELOGS

KevB, May 22, 2012 - 7:26 am UTC

Hi Tom,

I have been reviewing our backup and recovery strategy as a reult of some issues we have had of late. One of the questions presented naturally was "how much data could we lose in a serious disaster recovery scenario".

My answer was worded as being "the amount of data that has changed since the last INC0, INC1, INC2 or ArchiveLog backup, whichever is most recent".

At this point, a member of the audience suggested that he had read an article whereby it was possible to perpetually backup the archivelogs to a backupset, something of a concept I had previously not heard of.

My question is this: Is it possible to create a perpetual backup of archivelogs in a single server, single instance environment or is the amount of data that can be lost still dependant on the last successful backup and the changes made since that backup?
Tom Kyte
May 22, 2012 - 8:17 am UTC

if you have a single server - what are you backing up to?

Backup Target

KevB, May 22, 2012 - 8:40 am UTC

The database runs on a RAID 1+0 array, the backups stored on a separate array.

Thanks for responding so quickly!

Regards

Kev
Tom Kyte
May 22, 2012 - 9:45 am UTC

archive to the server and the "backup" array and you have your automatic backup.

Now, if you lose your data center - you are out of luck. Don't you have something else somewhere else?

Something I forgot....

KevB, May 22, 2012 - 8:42 am UTC

....because this is a production machine it is protected using Data Guard. The reason this has become an issue is because at the moment the archivelog backups are only being performed every 4 hours which is for us, an enormous amount of potentially lost data. That was the reason why a perpetually backed up archivelog may prove useful.
Tom Kyte
May 22, 2012 - 9:47 am UTC

if you only have one server machine - where is data guard in this picture???


I'm not seeing your overall layout here - you can just archive to your server and you other SAN and you are backed up - except for disaster recovery - but if you only have one computer?

Clarity....

KevB, May 22, 2012 - 1:39 pm UTC

Sorry Tom,

I read what I wrote and got confused myself!

We have production server 1 which, using Data Guard, is made highly available on server 2. The data files for the database are found on a high-speed array and the fast-recovery-area on a second. The storage arrangement is similar on both sides of the Data Guard.

The current backup environment comprises of an INC0 weekly, daily an INC1 and every 4 hours a backup of the archivelog.

The scenario I had in mind (and the reason I mentioned one server earlier) is in the event that the connection between server 1 and server 2 is broken (and therefore Data Guard can no longer function), we run the risk of losing up to 4 hours worth of data in the worst case. Obviously I want to reduce this but a member of the audience then brought up the subject of a perpetual archivelog backup that he seems to think is an available option.

Instead of having say, an archivelog backup every 15 minutes, the archivelog would be backed up continuously to the fast-recovery-area resulting in only the very minimal data loss in the event of a disaster recovery. The idea would then be to mount the storage on another server and restore the entire database. A perpetual archivelog backup would ensure that the very minimum of data would be lost.

Does that seem clearer?

Cheers Tom,

Regards

Kev
Tom Kyte
May 22, 2012 - 2:51 pm UTC

just archive to multiple locations - isn't that all you need here?

if you are using a fast recovery area, we are already archiving there. so I don't know what you mean by "backup up continuously to the fast-recovery-area"?

If you archive to multiple destinations and one of them is remote (if it isn't, you still have a big old single point of failure), then you are already done.

If the connection between your production site and your sole disaster recovery site is broken, then until you have another remote disaster recovery site - you are exposed, period. nothing will change that.

plus archive log command ? space consumption

A reader, August 17, 2014 - 6:41 am UTC

Hi tom

i realize that everytime i run

backup database plus archivelog, all the archivelog from the beginning of time will also be backup.

i also done some test as in

1) backup database plus archivelog
2) shutdown database normal to force all data to be written to disk
3) startup database again
4) backup database plus archivelog

seems to be the archivelog backed up in step 1 is again backup in step 4.

---------------------------------

q1) is it true that RMAN does not know about what are the exact relevant archivelogs to backup when issue plus archivelog command ?

relevant archivelog = data already written to disk and will be in backup
relevant archivelog = archivelog that has already been backup before


q2) if my retention policy is set to none. does that means that my archivelog will get more and more

and my backup will get larger and larger each time ?

Regards,
Noob

Jack, November 20, 2017 - 9:54 am UTC

I install VMware in my PC and I does not have internet connection even LAN. And I want to implement Dataguard or implement stand by database so it is possible to without internet connection or LAN Network?
or have another way?
Connor McDonald
November 21, 2017 - 1:26 pm UTC

Yes, VMware allows you setup networking between 2 VM's.

But you can also run a standby on the *same* host as the source. In that case, multiple tns entries can point to the same service name.

Archivelog Backup

JDP, September 02, 2021 - 8:07 am UTC

Hi TOM,

I backup the database using RMAN, full level 0 backup every sunday and level from Monday to Saturday. The incremental backup includes controlfiles, spfile and archivelogs.

Is there a need to backup the archivelogs every 15 daily, this is on top of the incremental backup of the DB daily.

If there is no need to perform the backup the archivelog, can you please share why?


Thank you TOM. Looking forward of your explaination.
Connor McDonald
September 03, 2021 - 6:54 am UTC

This depends on your service level agreements (SLA) and what else is happening with your archive logs.

eg

Lets say at 6pm each night you backup your archives each night to an *offsite* location.
Then at 3am...boom...the building explodes

You have a full backup, plus incrementals, plus archives to 6pm. That's as far as you will be able to recover. Data from 6pm to 3am is gone.

Does an every-15min archive backup help in this scenario? Well yes, but *only* if these are immediately offsite as well. If they were in the same building...then they're gone too.

Now ... maybe your SLA is "hey if we lose the building, fine - we'll cop data loss, but if just lose the server, then we shouldnt". In that case, *maybe* an adequate solution is just 2 archivelog destinations on your database - one local, one to a remote file server. In that way, they'll be copied somewhere safe as soon as they are created. If that is not an option, then once again. maybe the backup-each-15mins is a workaround.

For me, the easiest to way to make sure you've your archives is DataGuard.



Archivelog Backup

JDP, September 05, 2021 - 2:28 pm UTC

Hi TOM,

Good day.

This is a follow-up comment to a previous message from JDP dated September 2, 2021.

First of all, thank you for your prompt response and clear explanation with an example.

My follow-up question is this.

Actual scenario:
RMAN backup is done every Sunday Level 0, then daily Level 1. All incremental backups were done plus archivelogs, and backupsets were stored offsite (remote backup server).

Every 15 minutes the business wanted to backup also the archivelog separately, this is on top of the incremental Level 1 backup done daily.

RMAN settings are also configured to auto backup the controlfile and spfile.

Until to what point I can restore the database, if worse thing happened like the database was corrupted or boom the server is unfunctional/unavailable? Can I restore the database in Point In Time of failure?

The business is just a small business and the database is in a single instance and dataguard is not feasible for now.

Thank you TOM.


Cheers,
JDP
Connor McDonald
September 06, 2021 - 3:03 am UTC

To restore to point in time X you need:

1) a backup of *all* datafiles
2) all archive logs from the point of that backup to the point in time X

With respect to (1), I haven't distinguished between full and incremental because incrementals are an *efficiency* mechanism, ie, reducing the amount of archivelogs you need to complete the recovery. The help in performance, but do not get you away from the fact you need a full copy of every datafile as a reference point to commence recovery from.

With respect to (2), it all comes down to what level of protection you want and the magnitude of disaster you are worried about.

For example: If you want protection against:

(a) server blows up but disks are fine - you don't need a backup at all, just a new server

(b) server blows up and takes disks with it - well you need backups *and* those backups cannot have been taken to the same disks as your database

(c) server blows up and takes the entire storage array with it - you need those backups to be on a separate storage array somewhere else in your data centre

(d) computer room blows up - you need those backups *outside* your computer room. Maybe some rented storage on the cloud perhaps.

So that covers the *ability* to recover. Then it becomes of how much you are prepared to lose.

To lose absolutely nothing, you need real time mirroring of archivelogs to "somewhere else", eg, mirrored disk, or mirrored storage array , or mirrored to another location...Cost vs Risk vs Benefit

To lose up to 24hours of data in worse possible scenario (site disaster) you need your archives backed up once per day to an offsite location

To lose less than that, you need your archives backed up multiple times per day to an offsite location.

The key thing is meeting business requirements (and what they are prepared to pay for it), because a site disaster is typically rare, whereas disk failures are not, and human error is probably the biggest cause for needing a recovery.

So you can business signoff for (say):

- Loss of entire site: 24 hours data loss permissible
- Loss of all disks: 1 hour data loss
- Human error/software failure: Zero data loss

and plan your archivelog managemnet around those needs.

Response

JDP, September 06, 2021 - 1:59 pm UTC

Thank you TOM
Connor McDonald
September 07, 2021 - 7:10 am UTC

Glad we could help

More to Explore

Backup/Recovery

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