Home » RDBMS Server » Backup & Recovery » RMAN: autobackup
RMAN: autobackup [message #160892] Tue, 28 February 2006 23:19 Go to next message
hannah00
Messages: 37
Registered: March 2005
Member
Hi all,

If I have autobackup on as below:

configure retention policy to recovery window of 7 days; 
configure default device type to disk; 
configure controlfile autobackup on; 
configure channel device type disk format 'd:\FULL\test\%d_DB_%u_%s_%p';



and backup as follow:


run { 
  backup increment level=0 database plus archivelog; 
  delete force noprompt obsolete; 
}


Question: If I have INCREMENT backup go to different folder, I can set my data files and archived log to increment folder like d:\IMCREMENT\, but the controlfile backup still go to the full backup folder. How can I change the directory for controlfile even I have autobackup on.

thanks,


[Updated on: Tue, 28 February 2006 23:21]

Report message to a moderator

Re: RMAN: autobackup [message #160928 is a reply to message #160892] Wed, 01 March 2006 01:05 Go to previous messageGo to next message
alexzeng
Messages: 133
Registered: August 2005
Location: alexzeng.wordpress.com
Senior Member
You can use this command to set the controlfile backup destination:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/controlfile_backup_path';

The command below used to set the backup file path.
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/icre_path';

Alex zeng
Re: RMAN: autobackup [message #161031 is a reply to message #160892] Wed, 01 March 2006 08:22 Go to previous messageGo to next message
hannah00
Messages: 37
Registered: March 2005
Member
thanks Alex,

sorry, if I am not clear my self or you misunderstood my question. I know that command. My question is if you have run:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/controlfile_backup_path';


then you can change the backup of the controlfile to different folder on INCRMENTAL backup than the folder of the FULL. What I am trying to say is I have two folder or for FULL backup and one for INCREMENTAL backup. By setting the above command, backup of the control files still go to FULL folder and I really want it to go INCREMENTAL folder instead.

Re: RMAN: autobackup [message #161067 is a reply to message #161031] Wed, 01 March 2006 19:30 Go to previous messageGo to next message
alexzeng
Messages: 133
Registered: August 2005
Location: alexzeng.wordpress.com
Senior Member
you mean even you run this command before increment backup,
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/controlfile_backup_path';

The controlfile backup still go to '/full_backup_path'?

It's really unreasonable. What's the version of your database and rman?
Re: RMAN: autobackup [message #161080 is a reply to message #160892] Wed, 01 March 2006 22:41 Go to previous messageGo to next message
hannah00
Messages: 37
Registered: March 2005
Member
yes, that's true. if you set

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/controlfile_backup_path';


if you want to change your IMCREMENTAL backup to /INCREMENT_BACKUP_PATH, everything will go there except backup of control file STILL go to /FULL_BACKUP_PATH.

I am on 9.2.0.6 and rman on 9.2.0.6 also.


Dou have any advises???

Re: RMAN: autobackup [message #161119 is a reply to message #161080] Thu, 02 March 2006 01:37 Go to previous messageGo to next message
alexzeng
Messages: 133
Registered: August 2005
Location: alexzeng.wordpress.com
Senior Member
run these commands and upload your output:

RMAN> show all;
RMAN> run {
backup increment level=0 database plus archivelog;
delete force noprompt obsolete;
}

Re: RMAN: autobackup [message #161204 is a reply to message #160892] Thu, 02 March 2006 09:49 Go to previous messageGo to next message
hannah00
Messages: 37
Registered: March 2005
Member
OK:

RMAN> show all
2> ;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\FULL\
SERVER\TEST\TEST_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # 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 SNAPSHOT CONTROLFILE NAME TO 'D:\BACKUP\FULL\SERVER\TEST\SNCFDLT
RND01';
RMAN configuration has no stored or default parameters
RMAN> run {
2>      allocate channel c1 device type disk format 'D:\BACKUP\FULL\SERVER\DLT
RND01\TEST_%U';
3>      backup INCREMENTAL level=0 database plus archivelog delete input;
4>      delete FORCE noprompt obsolete;
5>     }

allocated channel: c1
channel c1: sid=16 devtype=DISK


Starting backup at 02-MAR-06
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=7 recid=14 stamp=584012152
channel c1: starting piece 1 at 02-MAR-06
channel c1: finished piece 1 at 02-MAR-06
piece handle=D:\BACKUP\FULL\SERVER\TEST\TEST_0MHCUKBP_1_1 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=D:\ARCHIVEDLOGS\TEST\TEST_00007.ARC recid=14 stamp=
584012152
Finished backup at 02-MAR-06

Starting backup at 02-MAR-06
channel c1: starting incremental level 0 datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00013 name=D:\ORADATA\TEST\DLR_DATA_01.ORA
input datafile fno=00014 name=D:\ORADATA\TEST\DLR_DATA_02.ORA
input datafile fno=00015 name=D:\ORADATA\TEST\DLR_INDX_01.ORA
input datafile fno=00007 name=D:\ORADATA\TEST\USERS_DATA_01.DBF
input datafile fno=00008 name=D:\ORADATA\TEST\USERS_INDX_01.DBF
input datafile fno=00004 name=D:\ORADATA\TEST\MOP_DATA_01.ORA
input datafile fno=00001 name=E:\ORADATA\TEST\SYS1TEST.DBF
input datafile fno=00005 name=D:\ORADATA\TEST\MOP_INDX_01.ORA
input datafile fno=00009 name=D:\ORADATA\TEST\TRP_DATA_01.DBF
input datafile fno=00010 name=D:\ORADATA\TEST\TRP_INDX_01.DBF
input datafile fno=00002 name=E:\ORADATA\TEST\RBS1TEST.DBF
input datafile fno=00003 name=F:\ORADATA\TEST\TEMP01.DBF
channel c1: starting piece 1 at 02-MAR-06
channel c1: finished piece 1 at 02-MAR-06
piece handle=D:\BACKUP\FULL\SERVER\TEST\TEST_0NHCUKBS_1_1 comment=NONE

channel c1: backup set complete, elapsed time: 00:02:36
Finished backup at 02-MAR-06

Starting backup at 02-MAR-06
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=8 recid=15 stamp=584012313
channel c1: starting piece 1 at 02-MAR-06
channel c1: finished piece 1 at 02-MAR-06
piece handle=D:\BACKUP\FULL\SERVER\TEST\TEST_0OHCUKGQ_1_1 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=D:\ARCHIVEDLOGS\TEST\TEST_00008.ARC recid=15 stamp=
584012313
Finished backup at 02-MAR-06

Starting Control File and SPFILE Autobackup at 02-MAR-06
piece handle=D:\BACKUP\FULL\SERVER\TEST\TEST_C-101968221-20060302-01 c
omment=NONE
Finished Control File and SPFILE Autobackup at 02-MAR-06

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
no obsolete backups found
released channel: c1

RMAN>

as you see, my backup go d:\oradata\full folder right now. so If I do INCRMENTAL backup as:

RMAN> run {
2>      allocate channel c1 device type disk format 'D:\BACKUP\INCREMENT\SERVER\DLT
RND01\TEST_%U';
3>      backup INCREMENTAL level=1 database plus archivelog delete input;
4>      delete FORCE noprompt obsolete;
5>     }


for INCREMENTAL backup, datafiles and archive log will go to INCREMENTAL folder but control file and snapshot of controlfile, still go to FULL folder.

what do I need to do so controlfile and snapshot of controlf file can go to INCREMENT folder???
Re: RMAN: autobackup [message #161318 is a reply to message #161204] Fri, 03 March 2006 04:29 Go to previous messageGo to next message
alexzeng
Messages: 133
Registered: August 2005
Location: alexzeng.wordpress.com
Senior Member
It's very clear.

You set the controlfile autobackup path to 'D:\BACKUP\FULL\SERVER\TEST\TEST_%F'!
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\FULL\SERVER\TEST\TEST_%F';


And you didn't change it before running the increment backup!

What you should do is to reset it before increment backup. After the backup is done, set it back. Here is the example:
RMAN> run {
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\FULL\SERVER\DLTRND01\TEST_%U';

2>      allocate channel c1 device type disk format 'D:\BACKUP\FULL\SERVER\DLTRND01\TEST_%U';
3>      backup INCREMENTAL level=0 database plus archivelog delete input;
4>      delete FORCE noprompt obsolete;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\FULL\SERVER\TEST\TEST_%F';
5>     }


Alex zeng | Skype: hans9zeng

[Updated on: Fri, 03 March 2006 04:32]

Report message to a moderator

Re: RMAN: autobackup [message #161364 is a reply to message #160892] Fri, 03 March 2006 08:32 Go to previous messageGo to next message
hannah00
Messages: 37
Registered: March 2005
Member
thanks,

I didn't know you can use "configure....." inside the backup block, that's my problem/questions. Let me try it out.

thanks again,
Re: RMAN: autobackup [message #161652 is a reply to message #161318] Mon, 06 March 2006 08:29 Go to previous messageGo to next message
hannah00
Messages: 37
Registered: March 2005
Member
[quote title=alexzeng wrote on Fri, 03 March 2006 05:29]It's very clear.

You set the controlfile autobackup path to 'D:\BACKUP\FULL\SERVER\TEST\TEST_%F'!
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\BACKUP\FULL\SERVER\TEST\TEST_%F';


What you should do is to reset it before increment backup. After the backup is done, set it back. Here is the example:
[code]


thanks Alex,

what is the purpose of set it backup after the incrment backup??? Can we just set the configure to wheereever the location we want to backup before it run every time???

you may have some reasons why you want to reset it back, please let me know.
Re: RMAN: autobackup [message #161919 is a reply to message #161652] Tue, 07 March 2006 22:13 Go to previous message
alexzeng
Messages: 133
Registered: August 2005
Location: alexzeng.wordpress.com
Senior Member
Yes. you can reset the configuration each time before running a backup.

The reason to set it back is : don't affect other backup scripts which are expecting using the default destination.

Alex zeng | Skpye me: Hans9zeng
Previous Topic: About RESET LOGS
Next Topic: RMAN jobs done, but failed!
Goto Forum:
  


Current Time: Fri Mar 29 05:42:31 CDT 2024