Rman backups delete
What commands would I use to do the following:
Daily I take a full compressed backup. I currently use:
backup as compressed backupset database;
And backup my archivelogs. I currently use:
backup archivelog all;
Then I want to keep 2 days of backup and archivelogs on disk and maybe 7 days of backup and backed up archivelogs on tape. How do I accomplish this part?
For what you are doing I like to utilize a storage manager product with my tape system where the files on disk are brought to tape automatically and stub files left in place where the files appear to be in the directory but are really on tape. This way I can just manage RMAN backup pieces and execute dsik based backups normally but manage my disk space better, manage RMAN as normal because as for as RMAN is concerned the files are there on disk. Tivoli Storage Manager (TSM) has a product that does this called HSM, other vendors have Hierarchical Storage Management (HSM) products as well. They are usually pretty inexpensive and remove complication related to managing the backup pieces between disk and tape with RMAN. You get the best of both worlds without having to manage anything differently then just disk based backups and you can use less storage.
Similar Messages
-
RMAN backup deletion by BP key
Hello,
We are having 2 node 11g RAC (ASM) cluster & had set up one ASM disk as FRA on which daily rman backup is performed now as FRA is running out of space we are required to backup FRA so I backup FRA using backup recovery area; now after that all my backups in list backupset summary command are coming as below
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
263 B F A * 28-MAR-11 1 2 YES BACKUP_PRODAILY_032811100000
264 B F A * 28-MAR-11 1 2 YES BACKUP_PRODAILY_032811100000
265 B F A * 28-MAR-11 1 2 YES BACKUP_PRODAILY_032811100000
& for each backup peice I am having two copies one on tape & other on FRA so now I want to remove one copy of every peice i.e FRA's one so taht FRA can be empty, Please tell me how can I delete one copy of each backupset as both copies are having same backupset set but hav different BP KEY as below
RMAN> list backupset 263;
List of Backup Sets
===================
BS Key Type LV Size
263 Full 1001.36M
List of Datafiles in backup set 263
File LV Type Ckp SCN Ckp Time Name
10 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/system.278.742062987
12 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/undotbs1.258.742063665
15 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/apps_ts_media.271.742062841
18 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/apps_ts_queues.285.742063093
27 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/apps_ts_tx_idx.259.742062485
29 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/apps_ts_tx_idx.266.742062695
30 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/ctxd.295.742063149
42 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/apps_ts_media.327.742654423
50 Full 124174871 28-MAR-11 +DATAPROD/prod/datafile/xxmpcd_ts_tx_idx.336.742838847
Backup Set Copy #1 of backup set 263
Device Type Elapsed Time Completion Time Compressed Tag
DISK 00:07:47 28-MAR-11 YES BACKUP_PRODAILY_032811100000
List of Backup Pieces for backup set 263 Copy #1
BP Key Pc# Status Piece Name
651 1 AVAILABLE +FRAPROD/prod/backupset/2011_03_28/nnndf0_backup_prodaily_032811100000_0.393.747007719
Backup Set Copy #2 of backup set 263
Device Type Elapsed Time Completion Time Compressed Tag
SBT_TAPE 00:07:47 25-APR-11 YES BACKUP_PRODAILY_032811100000
List of Backup Pieces for backup set 263 Copy #2
BP Key Pc# Status Media Piece Name
1036 1 AVAILABLE 3764a8c0:4daeb8e0:06c8:0001 FRA_BKP<PROD_361:747007718:1>.dbf
So please tell me how can I remove just one copy so that FRA can be empty.
Thanks & Regards
Saransh SoniMaybe you may set retention policy to 1,
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
End after taking a backup, you issue the following command so previous backup will be deleted:
RMAN> DELETE OBSOLETE;
Regards
Gokhan -
RMAN never deletes archive log backups
Hi all,
I have same problem as some of you have already faced.
I have some instances 10.2.0.4 running un archive log mode.
I take full hot backup daily.
I setup a rman script to backup and delete obsolete backups according to the following policy:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
and then:
run {
ALLOCATE CHANNEL RMAN_BACK_CH01 TYPE DISK;
BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/mnt/rman_202/pnetpres/db_pres_%U';
CROSSCHECK ARCHIVELOG ALL;
BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT '/mnt/rman_202/pnetpres/al_pres_%U';
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED BACKUP;
RELEASE CHANNEL RMAN_BACK_CH01;
crosscheck archivelog all;
delete noprompt archivelog all completed before 'sysdate -2';
DB full backups are being deleted, however archive logs backups are not deleted.
There are no tablespaces in backup or offline mode.
How can I know the reason why some archive log backups are kept ?
Even I clear the policy and perform a crosscheck and delete, those are not marked as obsolete neither deleted from disk.
Thanks in advance.Hi Fernando,
This are the ouputpus of the commands:
RMAN> REPORT OBSOLETE;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
RMAN> LIST BACKUP OF ARCHIVELOG ALL;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
1090 69.65M DISK 00:00:16 23-FEB-11
BP Key: 1093 Status: AVAILABLE Compressed: YES Tag: TAG20110223T061511
Piece Name: /mnt/rman_202/pnetproy/al_pres_0jm5c6bf_1_1
List of Archived Logs in backup set 1090
Thrd Seq Low SCN Low Time Next SCN Next Time
1 13 2173025156 21-FEB-11 2173028010 21-FEB-11
1 14 2173028010 21-FEB-11 2173041730 21-FEB-11
1 15 2173041730 21-FEB-11 2173041813 21-FEB-11
1 16 2173041813 21-FEB-11 2173106066 22-FEB-11
1 17 2173106066 22-FEB-11 2173108831 22-FEB-11
1 18 2173108831 22-FEB-11 2173116745 22-FEB-11
1 19 2173116745 22-FEB-11 2173117735 22-FEB-11
1 20 2173117735 22-FEB-11 2173117739 22-FEB-11
1 21 2173117739 22-FEB-11 2173117753 22-FEB-11
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1411 125.43M DISK 00:00:28 24-FEB-11
BP Key: 1414 Status: AVAILABLE Compressed: YES Tag: TAG20110224T061643
Piece Name: /mnt/rman_202/pnetproy/al_pres_0mm5eqqb_1_1
List of Archived Logs in backup set 1411
Thrd Seq Low SCN Low Time Next SCN Next Time
1 18 2173108831 22-FEB-11 2173116745 22-FEB-11
1 19 2173116745 22-FEB-11 2173117735 22-FEB-11
1 20 2173117735 22-FEB-11 2173117739 22-FEB-11
1 21 2173117739 22-FEB-11 2173117753 22-FEB-11
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
1 24 2173168857 23-FEB-11 2173221907 23-FEB-11
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1600 164.40M DISK 00:00:37 25-FEB-11
BP Key: 1603 Status: AVAILABLE Compressed: YES Tag: TAG20110225T061643
Piece Name: /mnt/rman_202/pnetproy/al_pres_0pm5hf6b_1_1
List of Archived Logs in backup set 1600
Thrd Seq Low SCN Low Time Next SCN Next Time
1 22 2173117753 22-FEB-11 2173165783 23-FEB-11
1 23 2173165783 23-FEB-11 2173168857 23-FEB-11
1 24 2173168857 23-FEB-11 2173221907 23-FEB-11
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
1 27 2173249177 24-FEB-11 2173313111 25-FEB-11
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
1829 132.24M DISK 00:00:30 26-FEB-11
BP Key: 1832 Status: AVAILABLE Compressed: YES Tag: TAG20110226T061627
Piece Name: /mnt/rman_202/pnetproy/al_pres_0sm5k3hr_1_1
List of Archived Logs in backup set 1829
Thrd Seq Low SCN Low Time Next SCN Next Time
1 25 2173221907 23-FEB-11 2173246002 24-FEB-11
1 26 2173246002 24-FEB-11 2173249177 24-FEB-11
1 27 2173249177 24-FEB-11 2173313111 25-FEB-11
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
1 29 2173316259 25-FEB-11 2173380316 26-FEB-11
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2058 218.03M DISK 00:00:48 27-FEB-11
BP Key: 2061 Status: AVAILABLE Compressed: YES Tag: TAG20110227T061628
Piece Name: /mnt/rman_202/pnetproy/al_pres_0vm5mnts_1_1
List of Archived Logs in backup set 2058
Thrd Seq Low SCN Low Time Next SCN Next Time
1 28 2173313111 25-FEB-11 2173316259 25-FEB-11
1 29 2173316259 25-FEB-11 2173380316 26-FEB-11
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
1 31 2173388686 26-FEB-11 2173465280 27-FEB-11
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2298 205.39M DISK 00:00:45 28-FEB-11
BP Key: 2301 Status: AVAILABLE Compressed: YES Tag: TAG20110228T061620
Piece Name: /mnt/rman_202/pnetproy/al_pres_12m5pc9l_1_1
List of Archived Logs in backup set 2298
Thrd Seq Low SCN Low Time Next SCN Next Time
1 30 2173380316 26-FEB-11 2173388686 26-FEB-11
1 31 2173388686 26-FEB-11 2173465280 27-FEB-11
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
1 35 2173530545 27-FEB-11 2173589000 28-FEB-11
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
BS Key Size Device Type Elapsed Time Completion Time
2546 180.29M DISK 00:00:39 01-MAR-11
BP Key: 2549 Status: AVAILABLE Compressed: YES Tag: TAG20110301T061533
Piece Name: /mnt/rman_202/pnetproy/al_pres_15m63to5_1_1
List of Archived Logs in backup set 2546
Thrd Seq Low SCN Low Time Next SCN Next Time
1 32 2173465280 27-FEB-11 2173499757 27-FEB-11
1 33 2173499757 27-FEB-11 2173527280 27-FEB-11
1 34 2173527280 27-FEB-11 2173530545 27-FEB-11
1 35 2173530545 27-FEB-11 2173589000 28-FEB-11
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
1 37 2173592018 28-FEB-11 2173671730 01-MAR-11
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
2801 85.40M DISK 00:00:19 02-MAR-11
BP Key: 2804 Status: AVAILABLE Compressed: YES Tag: TAG20110302T061613
Piece Name: /mnt/rman_202/pnetproy/al_pres_18m66i5d_1_1
List of Archived Logs in backup set 2801
Thrd Seq Low SCN Low Time Next SCN Next Time
1 36 2173589000 28-FEB-11 2173592018 28-FEB-11
1 37 2173592018 28-FEB-11 2173671730 01-MAR-11
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
1 39 2173674751 01-MAR-11 2173736248 02-MAR-11
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3058 137.93M DISK 00:00:30 03-MAR-11
BP Key: 3061 Status: AVAILABLE Compressed: YES Tag: TAG20110303T061548
Piece Name: /mnt/rman_202/pnetproy/al_pres_1bm696gk_1_1
List of Archived Logs in backup set 3058
Thrd Seq Low SCN Low Time Next SCN Next Time
1 38 2173671730 01-MAR-11 2173674751 01-MAR-11
1 39 2173674751 01-MAR-11 2173736248 02-MAR-11
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3324 138.96M DISK 00:00:31 04-MAR-11
BP Key: 3327 Status: AVAILABLE Compressed: YES Tag: TAG20110304T061559
Piece Name: /mnt/rman_202/pnetproy/al_pres_1em6bqsv_1_1
List of Archived Logs in backup set 3324
Thrd Seq Low SCN Low Time Next SCN Next Time
1 40 2173736248 02-MAR-11 2173739307 02-MAR-11
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
1 44 2173819171 03-MAR-11 2173882472 04-MAR-11
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3597 178.07M DISK 00:00:39 05-MAR-11
BP Key: 3600 Status: AVAILABLE Compressed: YES Tag: TAG20110305T061543
Piece Name: /mnt/rman_202/pnetproy/al_pres_1hm6ef8f_1_1
List of Archived Logs in backup set 3597
Thrd Seq Low SCN Low Time Next SCN Next Time
1 41 2173739307 02-MAR-11 2173784198 02-MAR-11
1 42 2173784198 02-MAR-11 2173816111 03-MAR-11
1 43 2173816111 03-MAR-11 2173819171 03-MAR-11
1 44 2173819171 03-MAR-11 2173882472 04-MAR-11
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
1 46 2173885557 04-MAR-11 2173947612 05-MAR-11
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
3835 198.44M DISK 00:00:43 06-MAR-11
BP Key: 3838 Status: AVAILABLE Compressed: YES Tag: TAG20110306T061548
Piece Name: /mnt/rman_202/pnetproy/al_pres_1km6h3kk_1_1
List of Archived Logs in backup set 3835
Thrd Seq Low SCN Low Time Next SCN Next Time
1 45 2173882472 04-MAR-11 2173885557 04-MAR-11
1 46 2173885557 04-MAR-11 2173947612 05-MAR-11
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
1 48 2173951657 05-MAR-11 2174026607 06-MAR-11
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4131 185.94M DISK 00:00:40 07-MAR-11
BP Key: 4134 Status: AVAILABLE Compressed: YES Tag: TAG20110307T061546
Piece Name: /mnt/rman_202/pnetproy/al_pres_1nm6jo0i_1_1
List of Archived Logs in backup set 4131
Thrd Seq Low SCN Low Time Next SCN Next Time
1 47 2173947612 05-MAR-11 2173951657 05-MAR-11
1 48 2173951657 05-MAR-11 2174026607 06-MAR-11
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
1 52 2174090299 06-MAR-11 2174147018 07-MAR-11
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4435 161.37M DISK 00:00:35 08-MAR-11
BP Key: 4438 Status: AVAILABLE Compressed: YES Tag: TAG20110308T061540
Piece Name: /mnt/rman_202/pnetproy/al_pres_1qm6mccc_1_1
List of Archived Logs in backup set 4435
Thrd Seq Low SCN Low Time Next SCN Next Time
1 49 2174026607 06-MAR-11 2174062014 06-MAR-11
1 50 2174062014 06-MAR-11 2174087203 06-MAR-11
1 51 2174087203 06-MAR-11 2174090299 06-MAR-11
1 52 2174090299 06-MAR-11 2174147018 07-MAR-11
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
1 54 2174149955 07-MAR-11 2174239915 08-MAR-11
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
4745 79.24M DISK 00:00:18 09-MAR-11
BP Key: 4748 Status: AVAILABLE Compressed: YES Tag: TAG20110309T061555
Piece Name: /mnt/rman_202/pnetproy/al_pres_1tm6p0os_1_1
List of Archived Logs in backup set 4745
Thrd Seq Low SCN Low Time Next SCN Next Time
1 53 2174147018 07-MAR-11 2174149955 07-MAR-11
1 54 2174149955 07-MAR-11 2174239915 08-MAR-11
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
1 56 2174242816 08-MAR-11 2174304682 09-MAR-11
1 57 2174304682 09-MAR-11 2174307679 09-MAR-11
BS Key Size Device Type Elapsed Time Completion Time
5270 135.13M DISK 00:00:31 10-MAR-11
BP Key: 5273 Status: AVAILABLE Compressed: YES Tag: TAG20110310T061603
Piece Name: /mnt/rman_202/pnetproy/al_proy_20m6rl53_1_1
List of Archived Logs in backup set 5270
Thrd Seq Low SCN Low Time Next SCN Next Time
1 55 2174239915 08-MAR-11 2174242816 08-MAR-11
1 56 2174242816 08-MAR-11 2174304682 09-MAR-11
1 57 2174304682 09-MAR-11 2174307679 09-MAR-11
1 58 2174307679 09-MAR-11 2174353241 09-MAR-11
1 59 2174353241 09-MAR-11 2174384330 10-MAR-11
1 60 2174384330 10-MAR-11 2174387259 10-MAR-11
RMAN>
For example the backups of archivelog from Feb 21st will never be deleted unless I force the delete.
I'd like to understand why it happens :-)
Thanks a lot,
Regards,
Diego. -
RMAN backup files are still exist since long time, how to delete?
Dear sir;
I'm using the below script to do daily backup, however there are many rman backup files are still exist and consumes HD size, how could I delete these files in daily bases? some files dated in FEB, MAR, APR,
============Daily RMAN script=========
rman target /<<!
backup incremental level=0 as compressed backupset database format '/u15/rman/full_backup_%U.rman';
backup archivelog all not backed up 2 times format '/u15/rman/arc_backup_%U.rman';
backup current controlfile format '/u15/rman/control_%U.rman';
delete archivelog all backed up 2 times to device type disk completed before 'sysdate-7';
delete noprompt obsolete;
================================END
Thanks and best regards
AliHi;
Our backup policy should have 7 days; however we have here some files from JAN, FEB,MAR, APR /2012 WHICH ARE BEYOND THE RETENTION DATE and these files should be deleted by executing " delete noprompt obsolete; ".
All files are exist in /u15/rman/
-rw-r----- 1 oracle oinstall 1151763968 Jan 21 01:36 arc_backup_7kn19h4a_1_1.rman
-rw-r----- 1 oracle oinstall 1136882176 Jan 21 01:36 arc_backup_7ln19h4q_1_1.rman
-rw-r----- 1 oracle oinstall 1135984640 Jan 21 01:36 arc_backup_7mn19h5a_1_1.rman
-rw-r----- 1 oracle oinstall 1126627328 Jan 21 01:37 arc_backup_7nn19h5q_1_1.rman
-rw-r----- 1 oracle oinstall 880606720 Mar 12 02:53 arc_backup_7nn5ldhp_1_1.rman
-rw-r----- 1 oracle oinstall 1093043712 Jan 21 01:37 arc_backup_7on19h6a_1_1.rman
-rw-r----- 1 oracle oinstall 9797632 Dec 15 01:04 control_04mu7tcp_1_1.rman
-rw-r----- 1 oracle oinstall 36896768 Mar 3 02:55 control_4cn4tm9k_1_1.rman
-rw-r----- 1 oracle oinstall 36896768 Mar 4 02:53 control_4on50ahm_1_1.rman
-rw-r----- 1 oracle oinstall 36896768 Mar 5 02:55 control_56n52v1j_1_1.rman
-rw-r----- 1 oracle oinstall 16252928 Jan 23 01:40 control_8tn1eq3t_1_1.rman
-rw-r----- 1 oracle oinstall 16252928 Jan 24 01:40 control_9cn1heg0_1_1.rman
-rw-r----- 1 oracle oinstall 202940416 Dec 15 01:04 full_backup_01mu7t50_1_1.rman
-rw-r----- 1 oracle oinstall 1097728 Dec 15 01:04 full_backup_02mu7tcc_1_1.rman
-rw-r----- 1 oracle oinstall 201285632 Dec 14 01:04 full_backup_0nmu58ou_1_1.rman
-rw-r----- 1 oracle oinstall 5957304320 Feb 29 02:46 full_backup_2ln4g9l1_1_1.rman
-rw-r----- 1 oracle oinstall 4128768 Feb 29 02:47 full_backup_2mn4gft8_1_1.rman
-rw-r----- 1 oracle oinstall 6027075584 Mar 1 02:49 full_backup_32n4o6ov_1_1.rman
-rw-r----- 1 oracle oinstall 4128768 Mar 1 02:49 full_backup_33n4od66_1_1.rman
-rw-r----- 1 oracle oinstall 6187171840 Mar 2 02:51 full_backup_3gn4qr50_1_1.rman
-rw-r----- 1 oracle oinstall 4145152 Mar 2 02:51 full_backup_3hn4r1kn_1_1.rman
-rw-r----- 1 oracle oinstall 6115786752 Mar 3 02:51 full_backup_40n4tfgu_1_1.rman
above is a short list of contents.
to do our daily backup we perform the following script (in daily)
==================
backup incremental level=0 as compressed backupset database format '/u15/rman/full_backup_%U.rman';
backup archivelog all not backed up 2 times format '/u15/rman/arc_backup_%U.rman';
backup current controlfile format '/u15/rman/control_%U.rman';
delete archivelog all backed up 2 times to device type disk completed before 'sysdate-7';
delete noprompt obsolete;
==================
Thanks and best regards
Ali -
Oracle 11.2.0.1
Windows
I takes RMAN backup at D:\RMAN_BAKCUP of our test database. Now there is space problem, I have to allocate some space to other folder. I shall take cold backup of database by shutdown. How do I start to delete RMAN backup from above location. It is incremental backup. What precautions should be there while deleting RMAN backup with archive logs.
Can I delete all archive logs too after consistent backup by shutting down the database ?
I am facing space problem, thats why I though that I shall take cold backup of db and now no need of rman backup as well as archive logs. Am I correct ?
Thanks.user12050217 wrote:
Oracle 11.2.0.1
Windows
I takes RMAN backup at D:\RMAN_BAKCUP of our test database. Now there is space problem, I have to allocate some space to other folder. I shall take cold backup of database by shutdown. How do I start to delete RMAN backup from above location. It is incremental backup. What precautions should be there while deleting RMAN backup with archive logs.
Can I delete all archive logs too after consistent backup by shutting down the database ?
I am facing space problem, thats why I though that I shall take cold backup of db and now no need of rman backup as well as archive logs. Am I correct ?
Thanks.Given what else I've read in this thread (test database, no need for point in time recovery, etc.) A 'cold' backup may be appropriate, but I'd still use rman to do it. I have a similar situation right now with one of my test databases. I took an rman cold backup (database is open MOUNT) with KEEP UNTIL 'SYSDATE + 60'. Once, sometimes twice, a day the developer asks for a restore to the backup. Piece of cake with rman, especially with a little script all ready to go. Would be a bit more difficult with a 'user managed' backup. -
Hi
Let say I have a rman backup on Monday,Tuesday,Wednesday,Thursday.
Would it be possible to delete only monday`s backup from rman? Note that it is not obsolete.hi,
how about this:
delete backup completed before "19-FEB-2010";
or
delete backup completed between "17-FEB-2010" and "19-FEB-2010";
Is it correct/helpful ?
Edited by: g777 on 2010-02-19 07:39 -
RMAN backup archivelog all delete input
Hello DBAs,
what does this command will do?
RMAN> backup archivelog all delete input;
DNI have set cron job for RMAN> backup archivelog all delete input; and its work.
But I got following message in my log file.
Please give ur 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.
DN -
How can i delete old RMAN backup files
Hi All
We have configured RMAN backup for one of our clients PROD instance[10.2.0.3] in 2010 Dec.
Now my doubt is how can i delte old backup files of Dec and January, only this two months backup files only i need to delte.
kindly suggest me.
The parameters are :
CONFIGURE RETENTION POLICY TO NONE;
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 '/ebiz/backup/PROD-%F';
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/ebiz/backup/PROD-%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/ebiz/oracle/proddb/10.2.0/dbs/snapcf_PROD.f'; # default
Regards
ShaikHello,
You can use this :
DELETE BACKUP COMPLETED BEFORE TO_DATE('01/31/2011 00:00:00','MM/DD/YY HH24:MI:SS');Regards,
Sylvie -
Delete all AVAILABLE valid RMAN backup by RMAN command
Hi
We are taking RMAN full backup on disk every day. But right now we don’t have enough space on RMAN backup mount point. So we want to delete all AVAILABLE valid RMAN backup by RMAN command.
Please guide to delete all AVAILABLE valid RMAN backup by RMAN command.
-Thanks
Edited by: Fazlul Kabir Mahfuz on May 13, 2013 11:06 AMYou can do it by manually delete the backups and archivelogs from OS location. Then use below commands
RMAN>crosscheck backup;
It will give status as EXPIRED for backups which are valid but not available at OS level.
RMAN>delete expired backup;
Delete all the backups whose status are EXPIRED from database level.
Similarly for archivelogs
RMAN>crosscheck archivelog all;
RMAN>delete expired archivelog all; -
Hi
how to delete the rman old backups?
i tried to issue
1.)delete obsolete; delete no prompt obsolete;
Next
2.)crosscheck backup;
delete expired backup;
My retention policy is for 2 days.
Now i want to know my disk space is getting filled. the backups in that partition is having oct 10 th oct 9th backups
But if i issue delete obsolete; it said no obsolete backups found
BUt still the old backups are there. how will i clear the space and how will i delete these backups?
i guess i cant delete this through normal rm command also .. still its occupying space.pls suggest.
oracle-10g versionRMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 2 days
no obsolete backups found
RMAN> report obsolete orphan;
no obsolete backups found
RMAN>
----------------------------------------l
ls -lrt
rw-r----- 1 oracle oinstall 12900327424 Oct 19 04:57 DBBS_FULL_700632559_4496_1
-rw-r----- 1 oracle oinstall 17884839936 Oct 19 05:28 DBBS_FULL_700633835_4497_1
-rw-r----- 1 oracle oinstall 15564259328 Oct 19 05:54 DBBS_FULL_700635470_4498_1
-rw-r----- 1 oracle oinstall 15396831232 Oct 19 06:24 DBBS_FULL_700637346_4499_1
-rw-r----- 1 oracle oinstall 11847139328 Oct 19 06:41 DBBS_FULL_700638851_4500_1
-rw-r----- 1 oracle oinstall 12832841728 Oct 19 07:12 DBBS_FULL_700640677_4501_1
-rw-r----- 1 oracle oinstall 11583221248 Oct 19 08:35 DBBS_arc_DBBS_coks614m_4504
-rw-r----- 1 oracle oinstall 12025791488 Oct 19 08:36 DBBS_arc_DBBS_cpks614m_4505
-rw-r----- 1 oracle oinstall 70328320 Oct 19 17:56 DBBS_LVL01_700681556_4537_1
-rw-r----- 1 oracle oinstall 266862592 Oct 19 17:59 DBBS_LVL01_700681556_4538_1
-rw-r----- 1 oracle oinstall 315555840 Oct 19 18:06 DBBS_LVL01_700682192_4539_1
-rw-r----- 1 oracle oinstall 326918144 Oct 19 18:10 DBBS_LVL01_700682347_4540_1
-rw-r----- 1 oracle oinstall 334602240 Oct 19 18:16 DBBS_LVL01_700682813_4541_1
-rw-r----- 1 oracle oinstall 1218052096 Oct 19 18:30 DBBS_LVL01_700683413_4543_1
-rw-r----- 1 oracle oinstall 404602880 Oct 19 18:41 DBBS_LVL01_700684250_4544_1
-rw-r----- 1 oracle oinstall 123543552 Oct 19 18:50 DBBS_LVL01_700684906_4545_1
-rw-r----- 1 oracle oinstall 12227190784 Oct 19 18:52 DBBS_LVL01_700683048_4542_1
-rw-r----- 1 oracle oinstall 61063168 Oct 19 19:01 DBBS_LVL01_700685442_4546_1
-rw-r----- 1 oracle oinstall 361545728 Oct 19 19:05 DBBS_LVL01_700685527_4547_1
-rw-r----- 1 oracle oinstall 278085632 Oct 19 19:16 DBBS_LVL01_700686338_4549_1
-rw-r----- 1 oracle oinstall 848576512 Oct 19 19:16 DBBS_LVL01_700686093_4548_1
-rw-r----- 1 oracle oinstall 422010880 Oct 19 19:28 DBBS_LVL01_700686984_4551_1
-rw-r----- 1 oracle oinstall 238927872 Oct 19 19:29 DBBS_LVL01_700686984_4550_1
-rw-r----- 1 oracle oinstall 409198592 Oct 19 19:40 DBBS_LVL01_700687740_4552_1
-rw-r----- 1 oracle oinstall 257196032 Oct 19 19:41 DBBS_LVL01_700687786_4553_1
-rw-r----- 1 oracle oinstall 529489920 Oct 19 19:51 DBBS_LVL01_700688411_4554_1
-rw-r----- 1 oracle oinstall 110436352 Oct 19 19:52 DBBS_LVL01_700688507_4555_1
-rw-r----- 1 oracle oinstall 255172608 Oct 19 20:02 DBBS_LVL01_700689113_4556_1
-rw-r----- 1 oracle oinstall 269983744 Oct 19 20:03 DBBS_LVL01_700689128_4557_1
-rw-r----- 1 oracle oinstall 205185024 Oct 19 20:10 DBBS_LVL01_700689774_4558_1
-rw-r----- 1 oracle oinstall 10838016512 Oct 20 08:33 DBBS_arc_DBBS_ehks8lg8_4561
-rw-r----- 1 oracle oinstall 12192736768 Oct 20 08:35 DBBS_arc_DBBS_eiks8lg8_4562
-rw-r----- 1 oracle oinstall 11442476544 Oct 20 09:06 DBBS_arc_DBBS_ejks8nb2_4563
-rw-r----- 1 oracle oinstall 11550635008 Oct 20 09:08 DBBS_arc_DBBS_ekks8nfq_4564
-rw-r----- 1 oracle oinstall 11564595200 Oct 20 09:40 DBBS_arc_DBBS_elks8p9d_4565
-rw-r----- 1 oracle oinstall 11148586496 Oct 20 09:42 DBBS_arc_DBBS_emks8pcu_4566
-rw-r----- 1 oracle oinstall 11379881984 Oct 20 10:22 DBBS_arc_DBBS_enks8r91_4567
-rw-r----- 1 oracle oinstall 11044812800 Oct 20 10:22 DBBS_arc_DBBS_eoks8rbt_4568
-rw-r----- 1 oracle oinstall 11134934016 Oct 20 10:56 DBBS_arc_DBBS_epks8tnd_4569
-rw-r----- 1 oracle oinstall 11645493248 Oct 20 10:58 DBBS_arc_DBBS_eqks8tof_4570
-rw-r----- 1 oracle oinstall 11573557760 Oct 20 11:31 DBBS_arc_DBBS_erks8vo2_4571
-rw-r----- 1 oracle oinstall 11303386624 Oct 20 11:33 DBBS_arc_DBBS_esks8vrl_4572
-rw-r----- 1 oracle oinstall 10233166336 Oct 20 12:05 DBBS_arc_DBBS_euks91sn_4574
-rw-r----- 1 oracle oinstall 11399922176 Oct 20 12:05 DBBS_arc_DBBS_etks91pr_4573
-rw-r----- 1 oracle oinstall 11519147520 Oct 20 12:40 DBBS_arc_DBBS_evks93p9_4575
-rw-r----- 1 oracle oinstall 11412811776 Oct 20 12:41 DBBS_arc_DBBS_f0ks93pi_4576
-rw-r----- 1 oracle oinstall 8986724864 Oct 20 13:08 DBBS_arc_DBBS_f2ks95rj_4578
-rw-r----- 1 oracle oinstall 12143316480 Oct 20 13:15 DBBS_arc_DBBS_f1ks95rc_4577 -
Can not recover table from rman backup
For testing I want to recover deleted table from rman backup.
I have make vm of oracle 11g. the following step i have applied but could not recover the table.
rman> backup database ;
On sqlplus create login as scott/tiger
create table scott.emp1(col1 varchar2(10));
insert into emp1(col1) value('Yasir ') ;
commit ;
select * from emp1 ;
it shows me one row successfully.
Now i have login the sys as sysdba
sqlplus> alter system switch logfile ;
after this i have drop the table .
Now to recover the table i have restored database on same vm.
rman>restore database ;
rman> recover database ;
rman> alter database open ;
on sqlplus i have issued
sqlplus> select * from scott.emp1 ;
table or view does not exist.
any help how to recover the deleted table from rman backupHi,
Check this test case
SQL> create table TEST2 as select * from emp;
Table created.
SQL> select count(*) from TEST2;
COUNT(*)
15
SQL> select TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS') from dual;
TO_CHAR(SYSDATE,'DD-
10-SEP-2013 10:57:05
SQL> alter system switch logfile;
System altered.
SQL> drop table TEST2 purge;
Table dropped.
SQL> shu immediate
[oracle@vnode MYSHELL]$ rman target /
Recovery Manager: Release 11.2.0.2.0 - Production on Tue Sep 10 10:58:39 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DDTEST (DBID=1667776968, not open)
RMAN> run{
set until time "to_date('2013 Sep 10 10:57','yyyy mon dd hh24:mi')";
restore database;
recover database;
alter database open resetlogs;
}2> 3> 4> 5> 6>
media recovery complete, elapsed time: 00:00:02
Finished recover at 10-SEP-13
database opened
RMAN> exit
SQL> set lin 200 pages 100
SQL> select count(*) from test2;
COUNT(*)
15
HTH -
Unable to restore and recover my Database from RMAN Backup
Dear All,
Iam practicing RMAN in Windows environment.
My configurations are
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:\Backup\%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # 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 ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\ORACLE\DATABASE\SNCFORCL.ORA';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'F:\Backup\%U.bak';
Then i took the RMAN backup, now iam shutdown my DB and removed one logfile..
then i tried to startup the DB but it is saying
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: 'E:\ORADATA\ORCL\REDO03.LOG'
So i tried to restore the Database with my rman backup
RMAN> restore database;
But i am unable to restore my logfile in the Datafiles location where as all other datafiles are restored but redo logfiles are not restored.
So, i am unable to recover my DB
Please tell me whether i am doing any mistake, what is the solution for my problem.
Thanks in advance
MahiAll you restored was your datafiles.
Now issue recover database and that will apply the archive logs.
This is in the oracle documentation.
"You must restore backups of these archived logs for recovery to proceed. You can restore either to the default or nondefault location. If you do not have backups, then you must performing incomplete recovery up to an SCN before the first missing redo log and open RESETLOGS."
http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/osrecvry.htm
In this case after issuing restore database in RMAN, then issue this.
"Recover database"
It will then be an incomplete recovery. They should have been multiplexed. Did you restore your controlfile with this backup? You may have to issue an "Alter database open resetlogs;" -
Restore spfile from rman backup ---- error.
Hi,
I am trying to execute recovery on new machine ...
I have done the following steps..
I have one database as ora10g2 as peroduction database on one machine as hosta
I have created a catalog on another machine cora10g2 (hostb)
I have taken a full backup from hosta as per following ...
the following command execute from hosta machine.
$ rman target sys/<passwd>@ora10g2 catalog rman/rman@cora10g2 ...
Backup completed ...
Now I am trying to restore this backup on hostb machine where i have already rman catlog database ..
I have done the following setting ...on host b
set oracle_sid=DUP
and execute following command ...
rman target / catalog rman/rman@cora10g2
RMAN> set dbid 2760732370
executing command: SET DBID
database name is "BAAN10G2" and DBID is 2760732370
RMAN>
RMAN>
RMAN> startup force nomount ;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/dbs/baan10g2/dbs/initbaan10g2.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1977112 bytes
Variable Size 67114216 bytes
Database Buffers 83886080 bytes
Redo Buffers 6406144 bytes
RMAN>
RMAN>
RMAN>
RMAN> show all ;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman/backup/control/cntrl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/baanora3/rman/ora10g2/bkup_db_%d_s%s_P%p_t%t' MAXPIECESIZE 1024;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
RMAN>
RMAN>
RMAN> list backup of spfile ;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
2420 Full 7.33M DISK 00:00:01 14-JUN-07
BP Key: 2426 Status: AVAILABLE Compressed: NO Tag: TAG20070614T182935
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070614-00
SPFILE Included: Modification time: 14-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2509 Full 7.33M DISK 00:00:01 15-JUN-07
BP Key: 2515 Status: AVAILABLE Compressed: NO Tag: TAG20070615T130416
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-00
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2694 Full 7.33M DISK 00:00:01 15-JUN-07
BP Key: 2739 Status: AVAILABLE Compressed: NO Tag: TAG20070615T131703
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-01
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2760 Full 80.00K DISK 00:00:01 15-JUN-07
BP Key: 2763 Status: AVAILABLE Compressed: NO Tag: TAG20070615T163437
Piece Name: /rman/spfile/spfile.ora
SPFILE Included: Modification time: 15-JUN-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
2769 Full 7.33M DISK 00:00:02 15-JUN-07
BP Key: 2771 Status: AVAILABLE Compressed: NO Tag: TAG20070615T163441
Piece Name: /rman/backup/control/cntrl_c-2760732370-20070615-02
SPFILE Included: Modification time: 15-JUN-07
RMAN>
RMAN>
RMAN> restore spfile from autobackup ;
Starting restore at 19-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=35 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=34 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=33 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20070619
channel ORA_DISK_1: looking for autobackup on day: 20070618
channel ORA_DISK_1: looking for autobackup on day: 20070617
channel ORA_DISK_1: looking for autobackup on day: 20070616
channel ORA_DISK_1: looking for autobackup on day: 20070615
channel ORA_DISK_1: looking for autobackup on day: 20070614
channel ORA_DISK_1: looking for autobackup on day: 20070613
channel ORA_DISK_1: no autobackup in 7 days found
channel ORA_DISK_2: looking for autobackup on day: 20070619
channel ORA_DISK_2: looking for autobackup on day: 20070618
channel ORA_DISK_2: looking for autobackup on day: 20070617
channel ORA_DISK_2: looking for autobackup on day: 20070616
channel ORA_DISK_2: looking for autobackup on day: 20070615
channel ORA_DISK_2: looking for autobackup on day: 20070614
channel ORA_DISK_2: looking for autobackup on day: 20070613
channel ORA_DISK_2: no autobackup in 7 days found
channel ORA_DISK_3: looking for autobackup on day: 20070619
channel ORA_DISK_3: looking for autobackup on day: 20070618
channel ORA_DISK_3: looking for autobackup on day: 20070617
channel ORA_DISK_3: looking for autobackup on day: 20070616
channel ORA_DISK_3: looking for autobackup on day: 20070615
channel ORA_DISK_3: looking for autobackup on day: 20070614
channel ORA_DISK_3: looking for autobackup on day: 20070613
channel ORA_DISK_3: no autobackup in 7 days found
channel ORA_DISK_4: looking for autobackup on day: 20070619
channel ORA_DISK_4: looking for autobackup on day: 20070618
channel ORA_DISK_4: looking for autobackup on day: 20070617
channel ORA_DISK_4: looking for autobackup on day: 20070616
channel ORA_DISK_4: looking for autobackup on day: 20070615
channel ORA_DISK_4: looking for autobackup on day: 20070614
channel ORA_DISK_4: looking for autobackup on day: 20070613
channel ORA_DISK_4: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/19/2007 18:00:13
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
RMAN>
I am not able to restore spfile from rman backup ;;;Hi,
I would like to know few things
1. How are you setting the db_name ? you can set db_id at RMAN, how are you setting the db_name ?
2. Do you have any default init file at default location ? if yes, is the db_name parameter set correctly in that file ?
Since spfile is yet to be restored, you must set the db_name parameter correctly before you start spfile restore.This can be done with init file at default location which can even contain just one paremeter i.e db_name. -
NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES
제품 : RMAN
작성날짜 : 2004-05-20
NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES
=======================================================
오라클 9i RMAN 에서는 백업을 보다 효율적으로 할 수 있는 기능을 보강 했다.
지금 소개할 "Retention Policies" 기능을 통해서 보다 효율적인 RMAN 백업
전략을 세울 수 있다.
1. 백업 화일 최적화 방법 (Backup File Optimization)
백업 화일 최적화란 백업에 소요되는 공간을 최소화 하는 전략이다. RMAN
백업시에 같은 정보 (dbid, checkpoint, and resetlogs data 등등) 를 가지고 있는
화일이 이미 존재하는 백업 셋 내부에 있는지 체크하게 된다. 만일 같은 화일이
이미 백업 되어 있다면 BACK UP 명령은 해당 화일에 대해서는 백업을 하지 않게
된다.
이때 같은 화일이라고 판단하는 기준은 다음과 같다.
* Datafile: 같은 DBID, checkpoint SCN, resetlogs SCN 과 time. 데이타 화일은
반드시정상적으로 offline 되었거나, read-only 이거나, 또는 정상적 으로 close
되어야 함.
* Archived redo log: 같은 thread, sequence number, 그리고 같은 Resetlogs
SCN 과 time.
* Backup Set: 같은 Backup Set recid 와 stamp.
RMAN 이 백업을 수행하다가 위와 같은 조건의 화일이 이미 존재함을 확인하면
이것은 건너뛰게 될 화일의 대상이다. 하지만 이때 바로 Skip 을 결정하지 않고
정해진 Retention Policies 를 조사 한후에 Skip 여부를 결정 하게 된다.
만일 백업 명령에 DELETE INPUT option 이 사용되면 RMAN 은 백업이 Skip
되어도 화일을 지우게 된다.
RMAN 은 모든 화일에 대한 백업이 Skip 되어도 에러메시지나 경고를 보내지
않는다.
그러나 만일 데이터 화일에 대한 백업이 recovery policy window 보다 오래
된 것 이면 RMAN 은 새로운 백업 화일을 만들기 위해서 화일을 백업 하게 된다.
Note:
자체적인 expirations policy 를 가지고 있는 media manager 를 사용할 경우에는
이런 백업 최적화 정책을 사용하는 것에 신중을 기해야 한다.
백업 최적화 를 사용하기 위해서는 CONFIGURE 명령을 사용한다. CONFIGURE
명령은 명령 수행 이후에 이루어지는 모든 백업에 대해 적용이 된다.
예:
CONFIGURE BACKUP OPTIMIZATION ON; # default 는 OFF
2. Backup Optimization에 Retention Policies 적용 하기
Retention Policy 로 백업 최적화를 조절 할 수 있다. 그러나 retention policy를
사용하지 않기 위해서는 'CONFIGURE RETENTION POLICY TO NONE' 을
이용해서 명시적으로 retention policy를 사용하지 않는다고 해야 한다. 디폴트로
REDUNDANCY = 1 이 적용 된다.
a. Recovery Window 를 이용한 Backup Optimization
만일 백업 최적화가 enable 되어 있고 Recovery Window 가 retention policy
적용을 위해서 셋업 되어 있으면 RMAN 은 항상 가장 최근의 백업이 Recovery
Window 보다 오래된 데이터 화일을 백업한다.
예를 들면 다음과 같은 조건에서
o Today is February 21.
o The recovery window is 7 days.
o The most recent backup of tablespace tbs2 to tape is January 3.
o Tablespace tbs2 is read-only.
2월 21일에 tbs2 테이블 스페이스를 테이프로 백업을 하라는 명령을 내리면,
RMAN 은 이 화일이 1월3일 이후에 변경 사항이 없는데도 불구 하고 백업을 하게
된다. 이로써 RMAN 은 최근 7일 동안에 최소한 한번의 백업이 있어야 된다는
조건을 지키게 된다.
이러한 작동 방식은 media manager 가 오래된 테잎을 제거 해도 되도록 한다.
그렇지 않다면, media manager 는 1월 3일의 백업을 무한정 가지고 있게 된다.
2월 21일에 tbs2 테이블 스페이스의 보다 최근의 백업을 만듦으로 써, RMAN 은
media manager 가 1월 3일에 백업 했던 테입을 지워도 되도록 한다.
b. Redundancy 를 이용한 Backup Optimization
Retention policy 로 Redundancy 를 채택 한 경우에 RMAN 은 Redundancy
에 1을 더한 갯수를 초과하는 오프라인 또는 읽기 전용 화일의 백업을 건너뛴다.
이때 'CONFIGURE RETENTION POLICY TO REDUNDANCY n' 명령어로
Redundancy의 갯수를 정한다.
아래와 같은 백업 최적화 명령을 내린 경우를 예로 든다:
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
아카이브 테이블스페이스를 한번도 백업을 받은적이 없고 다음의 작업을 1주일
동안 한다고 하자.
Day Action Result Redundant Backup
Monday Take tablespace archive offline clean.
Tuesday Run BACKUP DATABASE. The archive tablespace is backed up.
Wednesday Run BACKUP DATABASE. The archive tablespace is backed up.
Thursday Run BACKUP DATABASE. The archive tablespace is backed up. Tuesday backup.
Friday Run BACKUP DATABASE. n/a Tuesday backup.
Saturday Run BACKUP DATABASE. n/a Tuesday backup.
Sunday Run DELETE OBSOLETE. The Tuesday backup is deleted.
Monday Run BACKUP DATABASE. The archive tablespace is backed up. Wednesday backup.
화요일, 수요일, 그리고 목요일의 백업은 아카이브 테이블 스페이스를 복사 해서
3개의 백업이 반드시 존재 해야 한다는 조건을 충촉 시킨다. (1+Redundancy)
금요일과 토요일에는 백업 최적화 조건에 의해서 아카이브 테이블 스페이스를
복사하지 않게 된다.
RMAN 은 일요일에는 유효기간이 지난 백업 화일을 지우게 된다. 따라서 화요일에
만든 백업은 삭제 된다. 월요일의 전체 백업은 3개의 백업이 존재 해야 한다는 조건
때문에 아카이브 테이블 스페이스를 또 다시 백업하게 된다. 이런 방식으로 백업
사이클이 진행 된다.
3. RETENTION POLICY NONE vs. DEFAULT
주의 사항:
'CONFIGURE RETENTION POLICY TO NONE' 과 'CONFIGURE RETENTION
POLICY TO DEFAULT' 는 그 의미가 같지 않다. 전자는 RETENTION POLICY
자체가 존재 하지 않는다는 의미 이며 백업은 expire 되지 않으며 'DELETE
OBSOLETE' 명령은 사용 할 수 없게 된다. 후자는 디폴트 RETENTION POLICY
(REDUNDANCY 1) 를 사용하게 된다는 의미 이다.
'DELETE OBSOLETE' 명령은 RETENTION POLICY 기준으로 expire 된 백업을
제거 하라는 명령이다.
보다 자세한 내용은 Oracle9i Recovery Manager User's Guide and
Reference의 Backup Optimization 부분을 참고 하시기 바랍니다.
--------------THE END----------------------------------------------Hi,
Backup optimisation = +- do not copy empty space.
So, when you issue your BACKUP statement, it backs up the datafile. dot. nothing more.
In order to achieve what you're testing, look into TFM for BACKUP INCREMENTAL LEVEL x .
Regards,
Yoann. -
Need Advice on RMAN backup script
Hi;
Can any one advice if any error or guide to make RMAN backup proper :
Backup Policy are:
1. 0 level backup
2. current log file is arvhived before backing up
3. backup whole database (datafiles)
4. backup separate control file
5. backup is done on disk
6. control file auto backup ON
7. only 7 days archive log are need to be preserve ; old need to be deleted
### one time paramters seting
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
### Command for weekly 0 level backup
run {
allocate channel c1 type disk;
sql 'alter system archive log current';
backup incremental level 0 tag = weekly_database format 'o:\rman\backup\full_weekly_%d_%s_%p_%t'(database);
release channel c1;
configure controlfile autobackup format for device type disk to 'o:\rman\backup\auto_ctrl_weekly_%f';
allocate channel c1 type disk;
backup tag = weekly_arch archivelog until time 'sysdate-7' format 'o:\rman\backup\archive_weekly_%d_%s_%p_%t';
delete archivelog until time 'sysdate-7';
release channel c1;
Regards
SmithDear Pierre F.;
Actually, I just added in my backup plan to have daily backup through RMAN, instead of COLD backup.
I have planned to take cold backup once a week. here is the side of data:
*** datafile 410
*** size of database : 86 GM
*** relog files size : 250MB
*** daily archive logs are : 250MB * 4(number of files) = 1GM aprox.
yes, time constraint is there; just because of the size of database. and we r going for 24/7
Is this script going to run only one per week ?
Ans: no I this was level 0 backup; i will take level 1 incremental backup with same script daily too.
Do you have any other RMAN script ?
ANS: no, I will modify same script for incremental.
after local copy of backup all backup files (RMAN) will be copy over network to backup server or we can install LTO tape device to copy directly from database server.
kindly advise me I am new in RMAN.
regards;
SMITH
Maybe you are looking for
-
My iPad 1 no longer connects with the pc
How can be fix it?
-
How do you know if your SIM card is an NFC capable card?
I recently had to get a new SIM card, but I didn't pay attention to know if it was an NFC type card. Is there any way to find out via MyVerizon account or with the SIM card number itself?
-
Cannot publish non-TextMEsage to a xml channel
Hi My application needs to respond when a row s inserted in a database table. For that I am using a RDBMS adapter (MS sql) and an application viewthat generates insert events. xml is used for communication and notification. i.e. database table->applc
-
ZCM SQL Server connection settings
Our SQL 2005 server is being hammered by our ZCM servers. When there is a SQL cluster failure, the ZCM servers (5 of them) continually try and reconnect to the SQL server. The SQL admin guy has asked if there is any kind of setting from the ZCM side
-
Do I need to redeploy and run tomcat every time I�m changing something?
Guys, I�m using MyEclipse as the IDE to develop struts application. I am a newbie to this topic (but doing just fine) Anyway, I do this: I write my code, deploy it, run Tomcat and than I click the site to see the results. sometime I am changing the w