Home » RDBMS Server » Backup & Recovery » Rman backup backupset question (Rdbms EE 10.2.0.3, Solaris 10)
Rman backup backupset question [message #489341] Fri, 14 January 2011 13:14 Go to next message
barnacle47
Messages: 6
Registered: October 2007
Location: Pennsylvania
Junior Member
I have been struggling with a lack of space for RMAN backups for some time, and cannot keep more than one compressed RMAN copy of our 3.7 Terabyte data warehouse at a time, along with all the backed up archive logs necessary to recover. Normally, I have to delete the previous rman backup before I do the one I am about to commence. I know that is not a very good situation, and a possible solution popped recently into my head. First, you should know that I do not have any tape device available. Second, I have to do the backups to a location other than my db_recovery_file_dest storage space. There is not enough room. So I back up with a format command to sent the compressed backupset to an old SAN that is fortunately still usable.

I do have enough space on another array to keep the most recent copy of our backup, which is over 400G in size. So I had an idea that perhaps I could copy the last Rman backup to that disk space using the backup backupset command, but I cannot find any example of how I can use that command and direct the copies of the backupset to that alternate location, which is NOT the db_recovery_file_dest, and is NOT a tape device.

Obviously, I need RMAN to know where the last backup has been relocated to, just in case the current backup fails for some reason. Is it possible to use backup backupset in conjunction with a format command? I know I have to also specify to delete input so Rman does not have two conflicting records of where the last backup was located.
Re: Rman backup backupset question [message #489367 is a reply to message #489341] Sat, 15 January 2011 03:29 Go to previous messageGo to next message
John Watson
Messages: 8502
Registered: January 2010
Location: Global Village
Senior Member
It works for me, with or without DELETE INPUT:
RMAN> backup as compressed backupset datafile 4 format 'c:\tmp\df4.bset';

Starting backup at 15-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=C:\ORACLE\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 15-JAN-11
channel ORA_DISK_1: finished piece 1 at 15-JAN-11
piece handle=C:\TMP\DF4.BSET tag=TAG20110115T092247 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 15-JAN-11

Starting Control File and SPFILE Autobackup at 15-JAN-11
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\AUTOBACKUP\2011_01_15\O1_MF_S_740481771_6M2SVDXC_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 15-JAN-11

RMAN> list backup of datafile 4;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
39      Full    4.14M      DISK        00:00:01     15-JAN-11
        BP Key: 40   Status: AVAILABLE  Compressed: YES  Tag: TAG20110115T092247
        Piece Name: C:\TMP\DF4.BSET
  List of Datafiles in backup set 39
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  4       Full 3678029    15-JAN-11 C:\ORACLE\ORADATA\ORCL\USERS01.DBF

RMAN> backup backupset 39 format 'c:\tmp\df4.bset.bset';

Starting backup at 15-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=45, stamp=740481768, piece=1
channel ORA_DISK_1: starting piece 1 at 15-JAN-11
channel ORA_DISK_1: backup piece C:\TMP\DF4.BSET
piece handle=C:\TMP\DF4.BSET.BSET comment=NONE
channel ORA_DISK_1: finished piece 1 at 15-JAN-11
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
Finished backup at 15-JAN-11

Starting Control File and SPFILE Autobackup at 15-JAN-11
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\AUTOBACKUP\2011_01_15\O1_MF_S_740481825_6M2SX30R_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 15-JAN-11

RMAN> backup backupset 39 format 'c:\tmp\df4.bset.bset.2' delete input;

Starting backup at 15-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: input backup set: count=45, stamp=740481768, piece=1
channel ORA_DISK_1: starting piece 1 at 15-JAN-11
channel ORA_DISK_1: backup piece C:\TMP\DF4.BSET
piece handle=C:\TMP\DF4.BSET.BSET.2 comment=NONE
channel ORA_DISK_1: finished piece 1 at 15-JAN-11
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
deleted backup piece
backup piece handle=C:\TMP\DF4.BSET RECID=40 STAMP=740481768
deleted backup piece
backup piece handle=C:\TMP\DF4.BSET.BSET RECID=42 STAMP=740481824
Finished backup at 15-JAN-11

Starting Control File and SPFILE Autobackup at 15-JAN-11
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\AUTOBACKUP\2011_01_15\O1_MF_S_740481883_6M2SYWOS_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 15-JAN-11

RMAN>

That was 11.2.0.1, perhaps your release behaves differently?



Re: Rman backup backupset question [message #489376 is a reply to message #489367] Sat, 15 January 2011 07:21 Go to previous messageGo to next message
barnacle47
Messages: 6
Registered: October 2007
Location: Pennsylvania
Junior Member
Thanks for your response.

I suspect the behavior would not have changed in 11g. The other thing I wonder is if I can use a statement like
"backup backupset all completed before 'sysdate -3' format='/g02/oracle/backcopy' delete input;"

The goal is simply to relocate the dozens of backupsets from our previous backup without renaming them in any way. Our database (I inherited this mess) has 669 datafiles and 634 tablespaces. I found by trial and error that the best performance for our backup is achieved using a maxsetsize of 180G and filesperset 6, and 12 channels (our box has 12 cpus, and so I can see during the backup 12 separate backup operations of 6 files or less). So that results in a lot of backupsets of varying sizes. I just want to move them in one operation to a new place.

I have no place to test what I am trying to do.
Re: Rman backup backupset question [message #489383 is a reply to message #489376] Sat, 15 January 2011 10:07 Go to previous messageGo to next message
BlackSwan
Messages: 26759
Registered: January 2009
Location: SoCal
Senior Member
>I have no place to test what I am trying to do.
why not?
I have Oracle installed on a couple home systems.
Re: Rman backup backupset question [message #489407 is a reply to message #489383] Sat, 15 January 2011 12:59 Go to previous messageGo to next message
barnacle47
Messages: 6
Registered: October 2007
Location: Pennsylvania
Junior Member
My current home pc is a dell 8200 that is about 8 years old, with 512m ram and 7G free space. I will soon transition to a newer box and will probably create a small oracle db on it.
Re: Rman backup backupset question [message #489408 is a reply to message #489407] Sat, 15 January 2011 13:07 Go to previous messageGo to next message
BlackSwan
Messages: 26759
Registered: January 2009
Location: SoCal
Senior Member
External USB disks are relatively cheap these days; so disk space should NOT be major constraint.
Re: Rman backup backupset question [message #489409 is a reply to message #489407] Sat, 15 January 2011 15:21 Go to previous message
John Watson
Messages: 8502
Registered: January 2010
Location: Global Village
Senior Member
I do sympathize with you for not having a PC at home you can use, but surely you have one at work? What are you using as a terminal onto your data warehouse? Oracle licensing is a bit of a mystery, and if you are in any doubt you MUST check with your account manager, but I think you can install anything anywhere if all you want to do is check some syntax.

By the way, good testing on the RMAN performance - if you could write up what you did, with a description of the environment, as a blog article, I for one would like to read it. Many people do not work with DBs that size.
Previous Topic: Recovery - Last Resort Options
Next Topic: Trying to understand EXP error
Goto Forum:
  


Current Time: Mon Mar 08 16:27:13 CST 2021