Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RMAN advice please.

Status
Not open for further replies.
Oct 12, 2005
204
GB
Hi,

I'm new to Oracle ( we are using 10g ) and have just recently ventured into RMAN backups, which work great, weve done a restore and it restored perfectly, at present we just do a full RMAN online backup every night to disk which is then in turn backed upto tape as part of the full nightly server backup ( maybe there is a better way to do this, but this method works well for us )

As part of the initial RMAN setup I configured channel 1 for type disk and gave it a path to store the backups, this works fine, but now we would like to do a 'Month End' backup of the database and store it on a seperate tape so we can store it off site.

To do this i would ideally like to backup this monthly backup to a different directory on the server, then back this up to tape.

My question is can I ( as part of the backup script ) configure this, just for the monthly backup? below are the scripts I use for the Full Daily Backup.
Code:
FULL_BACKUP.BAT
REM **** RMAN full oracle backup of DB_NAME ****

set output=d:\oracle_backup\logs

set logfile=d:\oracle_backup\logs\backup_DB_NAME.log


c:\oracle\product\10.2.0\db_1\bin\rman target user/pass@db_name @d:\oracle_backup\script\full_backup.sql > %logfile% 2>&1

namedate /TXYZ:"dmY-H-M-S" %logfile%

Code:
FULL_BACKUP.SQL
run {	backup device type disk tag 'WholeDB_Daily_Backup_DB' database;
	sql 'alter system archive log current';
	
	backup device type disk tag 'Daily_Archive_Backup' archivelog all not backed up;
	delete noprompt archivelog until time 'sysdate -2' backed up 1 times to device type disk;
	delete noprompt obsolete device type disk;	
	
}

Do i just need to add:
set channel 1 device type disk format 'path to backup directory'?

Then this will just set the destination for this backup only? or is there something else I need to do?

Thanks in advance,
Mick.
 
Or how about this?

Code:
run {	allocate channel 1 device type disk format 'd:\oracle_backup\DB\DB_PERIOD_END_BACKUP\db\DB_PERIOD_END_BACKUP_%D%M%Y%t';
	set controlfile autobackup format for device type disk to 'd:\oracle_backup\DB\period_end_backup\contf\%F';
	backup device type disk tag 'DB_Period_End_Backup_DB' database;
	sql 'alter system archive log current';
	backup device type disk tag 'DB_Period_End_Backup' archivelog all;
		
	
}

Mick.
 
Hi,

Been away for a week, but I still need to work this out, can anyone tell me if what I said in my second post is the correct way to go or is there a better way to accomplish what i need to do?

Regards,
Mick.
 
Hi,
your script in the 2nd post looks good, but you may run into problems when your backup reaches the default (or configured) filesperset or maxsetsize (thus creating more than 1 file/backup). Maybe this problem is solved by "%t" in your format declaration, but I'd make sure by adding something like "%U" for unique filenames.

I'm not sure what the cleanup-part of full_backup.sql will do to your monthly backups. You'll need to clean up those backups somewhen, but full_backup.sql can't know wheter the monthly backup is already on those off-site tapes or not.

Maybe writing your monthly backups directly to tape (using device type sbt_tape) would be the best solution.
 
Hi Stefanhei,

Thanks for your response, I did initially want to back this up straight to tape, but the problem is we only have one tape drive (8 slot multichanger) and this is located on another server, is it possible to still write to this device?, i have been looking but haven't found how to do this, and secondly is there anyway to specify which slot is used for the backup?

Thanks in advance,

Mick.
 
Hard to say without knowing your exact setup.
Do you use any backup solution (like Veritas NetBackup or Tivoli) or does that other server use OS-tools (fileshares,...) for your backups?
Most backup solutions give you a chance to decide which slot you use - e.g. in Veritas NetBackup we use policies to decide what media the backup has to be stored to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top