$ less full_back.cmd
su - oraprod << EOF
cd /home/tsm/rman
echo "***************************" >> full.log
echo " full backup begin " >> full.log
date >> full.log
rman target / log=full_backup.log<<EOF1
@full_back.rma
exit
EOF1
cat full_backup.log>>full.log
echo " full backup end " >> full.log
date >> full.log
echo "***************************" >> full.log
echo "***************************">>full.log
EOF
$ less full_back.rma
run{
allocate channel ch00 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup format 'proddb_full_%T_%t_%U' database;
backup format 'proddb_arc_%s_%p_%t' archivelog all delete input;
backup format 'proddb_control_%s_%p_%t' current controlfile;
release channel ch00;
}
RMAN> list backup summary;
using target database control file instead of recovery catalog
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
4 B A A SBT_TAPE 31-DEC-12 1 1 NO TAG20121231T213636
8 B A A SBT_TAPE 31-DEC-12 1 1 NO TAG20121231T214616
12 B A A SBT_TAPE 31-DEC-12 1 1 NO TAG20121231T231403
16 B A A SBT_TAPE 01-JAN-13 1 1 NO TAG20130101T231422
20 B A A SBT_TAPE 02-JAN-13 1 1 NO TAG20130102T231103
24 B A A SBT_TAPE 03-JAN-13 1 1 NO TAG20130103T231714
28 B A A SBT_TAPE 04-JAN-13 1 1 NO TAG20130104T231717
32 B A A SBT_TAPE 05-JAN-13 1 1 NO TAG20130105T231500
36 B A A SBT_TAPE 06-JAN-13 1 1 NO TAG20130106T231401
40 B A A SBT_TAPE 07-JAN-13 1 1 NO TAG20130107T231816
44 B A A SBT_TAPE 08-JAN-13 1 1 NO TAG20130108T231710
48 B A A SBT_TAPE 09-JAN-13 1 1 NO TAG20130109T231849
52 B A A SBT_TAPE 10-JAN-13 1 1 NO TAG20130110T231412
56 B A A SBT_TAPE 11-JAN-13 1 1 NO TAG20130111T231628
60 B A A SBT_TAPE 12-JAN-13 1 1 NO TAG20130112T231530
64 B A A SBT_TAPE 13-JAN-13 1 1 NO TAG20130113T231623
68 B A A SBT_TAPE 14-JAN-13 1 1 NO TAG20130114T231618
72 B A A SBT_TAPE 15-JAN-13 1 1 NO TAG20130115T231731
76 B A A SBT_TAPE 16-JAN-13 1 1 NO TAG20130116T231635
80 B A A SBT_TAPE 17-JAN-13 1 1 NO TAG20130117T231741
84 B A A SBT_TAPE 18-JAN-13 1 1 NO TAG20130118T231710
88 B A A SBT_TAPE 19-JAN-13 1 1 NO TAG20130119T231257
92 B A A SBT_TAPE 20-JAN-13 1 1 NO TAG20130120T231815
96 B A A SBT_TAPE 21-JAN-13 1 1 NO TAG20130121T231533
100 B A A SBT_TAPE 22-JAN-13 1 1 NO TAG20130122T231805
104 B A A SBT_TAPE 23-JAN-13 1 1 NO TAG20130123T231645
108 B A A SBT_TAPE 24-JAN-13 1 1 NO TAG20130124T231415
112 B A A SBT_TAPE 25-JAN-13 1 1 NO TAG20130125T231323
116 B A A SBT_TAPE 26-JAN-13 1 1 NO TAG20130126T231250
120 B A A SBT_TAPE 27-JAN-13 1 1 NO TAG20130127T231616
124 B A A SBT_TAPE 28-JAN-13 1 1 NO TAG20130128T231724
128 B A A SBT_TAPE 29-JAN-13 1 1 NO TAG20130129T231442
132 B A A SBT_TAPE 30-JAN-13 1 1 NO TAG20130130T231319
136 B A A SBT_TAPE 31-JAN-13 1 1 NO TAG20130131T231559
140 B A A SBT_TAPE 01-FEB-13 1 1 NO TAG20130201T231847
144 B A A SBT_TAPE 02-FEB-13 1 1 NO TAG20130202T231404
148 B A A SBT_TAPE 03-FEB-13 1 1 NO TAG20130203T231642
152 B A A SBT_TAPE 04-FEB-13 1 1 NO TAG20130204T232225
156 B A A SBT_TAPE 05-FEB-13 1 1 NO TAG20130205T232207
160 B A A SBT_TAPE 06-FEB-13 1 1 NO TAG20130206T231849
164 B A A SBT_TAPE 07-FEB-13 1 1 NO TAG20130207T231749
168 B A A SBT_TAPE 08-FEB-13 1 1 NO TAG20130208T232541
172 B A A SBT_TAPE 09-FEB-13 1 1 NO TAG20130209T232327
176 B A A SBT_TAPE 10-FEB-13 1 1 NO TAG20130210T231355
180 B A A SBT_TAPE 11-FEB-13 1 1 NO TAG20130211T231812
184 B A A SBT_TAPE 12-FEB-13 1 1 NO TAG20130212T231538
188 B A A SBT_TAPE 13-FEB-13 1 1 NO TAG20130213T231944
192 B A A SBT_TAPE 14-FEB-13 1 1 NO TAG20130214T231400
196 B A A SBT_TAPE 15-FEB-13 1 1 NO TAG20130215T231940
200 B A A SBT_TAPE 16-FEB-13 1 1 NO TAG20130216T232058
204 B A A SBT_TAPE 17-FEB-13 1 1 NO TAG20130217T231756
208 B A A SBT_TAPE 18-FEB-13 1 1 NO TAG20130218T231935
212 B A A SBT_TAPE 19-FEB-13 1 1 NO TAG20130219T231803
216 B A A SBT_TAPE 20-FEB-13 1 1 NO TAG20130220T231953
220 B A A SBT_TAPE 21-FEB-13 1 1 NO TAG20130221T232050
224 B A A SBT_TAPE 22-FEB-13 1 1 NO TAG20130222T231911
228 B A A SBT_TAPE 23-FEB-13 1 1 NO TAG20130223T231937
232 B A A SBT_TAPE 24-FEB-13 1 1 NO TAG20130224T232053
236 B A A SBT_TAPE 25-FEB-13 1 1 NO TAG20130225T232346
240 B A A SBT_TAPE 26-FEB-13 1 1 NO TAG20130226T232233
244 B A A SBT_TAPE 27-FEB-13 1 1 NO TAG20130227T232307
248 B A A SBT_TAPE 28-FEB-13 1 1 NO TAG20130228T232436
252 B A A SBT_TAPE 01-MAR-13 1 1 NO TAG20130301T232624
256 B A A SBT_TAPE 02-MAR-13 1 1 NO TAG20130302T232741
260 B A A SBT_TAPE 03-MAR-13 1 1 NO TAG20130303T232126
264 B A A SBT_TAPE 04-MAR-13 1 1 NO TAG20130304T232806
268 B A A SBT_TAPE 05-MAR-13 1 1 NO TAG20130305T232254
272 B A A SBT_TAPE 06-MAR-13 1 1 NO TAG20130306T232409
276 B A A SBT_TAPE 07-MAR-13 1 1 NO TAG20130307T232607
280 B A A SBT_TAPE 08-MAR-13 1 1 NO TAG20130308T232220
284 B A A SBT_TAPE 09-MAR-13 1 1 NO TAG20130309T232707
288 B A A SBT_TAPE 10-MAR-13 1 1 NO TAG20130310T232143
292 B A A SBT_TAPE 11-MAR-13 1 1 NO TAG20130311T232348
301 B A A DISK 12-MAR-13 1 1 NO TAG20130312T111241
302 B A A DISK 12-MAR-13 1 1 NO TAG20130312T111241
305 B A A SBT_TAPE 12-MAR-13 1 1 NO TAG20130312T232116
309 B A A SBT_TAPE 13-MAR-13 1 1 NO TAG20130313T232653
313 B A A SBT_TAPE 14-MAR-13 1 1 NO TAG20130314T232449
317 B A A SBT_TAPE 15-MAR-13 1 1 NO TAG20130315T232334
321 B A A SBT_TAPE 16-MAR-13 1 1 NO TAG20130316T232333
325 B A A SBT_TAPE 18-MAR-13 1 1 NO TAG20130318T232242
329 B A A SBT_TAPE 19-MAR-13 1 1 NO TAG20130319T232419
333 B A A SBT_TAPE 20-MAR-13 1 1 NO TAG20130320T232352
337 B A A SBT_TAPE 21-MAR-13 1 1 NO TAG20130321T232538
341 B A A SBT_TAPE 22-MAR-13 1 1 NO TAG20130322T232155
345 B A A SBT_TAPE 23-MAR-13 1 1 NO TAG20130323T232622
347 B F A SBT_TAPE 24-MAR-13 1 1 NO TAG20130324T230601
348 B F A SBT_TAPE 24-MAR-13 1 1 NO TAG20130324T230601
349 B A A SBT_TAPE 24-MAR-13 1 1 NO TAG20130324T232147
350 B F A SBT_TAPE 24-MAR-13 1 1 NO TAG20130324T232233
351 B F A SBT_TAPE 25-MAR-13 1 1 NO TAG20130325T230626
352 B F A SBT_TAPE 25-MAR-13 1 1 NO TAG20130325T230626
353 B A A SBT_TAPE 25-MAR-13 1 1 NO TAG20130325T232145
354 B F A SBT_TAPE 25-MAR-13 1 1 NO TAG20130325T232231
355 B F A SBT_TAPE 26-MAR-13 1 1 NO TAG20130326T231125
356 B F A SBT_TAPE 26-MAR-13 1 1 NO TAG20130326T231125
357 B A A SBT_TAPE 26-MAR-13 1 1 NO TAG20130326T232651
358 B F A SBT_TAPE 26-MAR-13 1 1 NO TAG20130326T232736
359 B F A SBT_TAPE 27-MAR-13 1 1 NO TAG20130327T230931
360 B F A SBT_TAPE 27-MAR-13 1 1 NO TAG20130327T230931
361 B A A SBT_TAPE 27-MAR-13 1 1 NO TAG20130327T232607
362 B F A SBT_TAPE 27-MAR-13 1 1 NO TAG20130327T232653
....
439 B F A SBT_TAPE 16-APR-13 1 1 NO TAG20130416T231244
440 B F A SBT_TAPE 16-APR-13 1 1 NO TAG20130416T231244
441 B A A SBT_TAPE 16-APR-13 1 1 NO TAG20130416T233042
442 B F A SBT_TAPE 16-APR-13 1 1 NO TAG20130416T233137
RMAN>
备份信息
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%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 COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/db/tech_st/11.1.0/dbs/snapcf_prod.f'; # default
RMAN> list backup of database completed before '26-MAR-2013';
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
347 Full 39.18G SBT_TAPE 00:14:52 24-MAR-13
BP Key: 347 Status: AVAILABLE Compressed: NO Tag: TAG20130324T230601
Handle: proddb_full_20130324_810947162_auo5c4iq_1_1 Media:
List of Datafiles in backup set 347
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
7 Full 5965219133530 24-MAR-13 /oracle/db/apps_st/data/owad01.dbf
9 Full 5965219133530 24-MAR-13 /oracle/db/apps_st/data/odm.dbf
17 Full 5965219133530 24-MAR-13 /oracle/db/apps_st/data/a_int02.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
351 Full 39.44G SBT_TAPE 00:14:20 25-MAR-13
BP Key: 351 Status: AVAILABLE Compressed: NO Tag: TAG20130325T230626
Handle: proddb_full_20130325_811033586_b2o5eovi_1_1 Media:
List of Datafiles in backup set 351
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system01.dbf
2 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system02.dbf
3 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system03.dbf
4 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system04.dbf
5 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system05.dbf
6 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/ctxd01.dbf
7 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/owad01.dbf
8 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_queue02.dbf
9 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/odm.dbf
10 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/olap.dbf
11 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/sysaux01.dbf
12 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/apps_ts_tools01.dbf
13 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system12.dbf
14 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_data04.dbf
15 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind06.dbf
16 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_ref03.dbf
17 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_int02.dbf
18 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/sysaux02.dbf
19 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/cuxd_data01
20 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/cuxx_data01
288 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system10.dbf
295 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system06.dbf
314 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/portal01.dbf
351 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system07.dbf
352 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system09.dbf
353 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system08.dbf
354 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/system11.dbf
379 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/undo01.dbf
392 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_data01.dbf
393 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind01.dbf
394 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_ref01.dbf
395 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_int01.dbf
396 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_summ01.dbf
397 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_nolog01.dbf
398 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_archive01.dbf
399 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_queue01.dbf
400 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_media01.dbf
401 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_data02.dbf
402 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_data03.dbf
403 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind02.dbf
404 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind03.dbf
405 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind04.dbf
406 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_txn_ind05.dbf
407 Full 5965219771840 25-MAR-13 /oracle/db/apps_st/data/a_ref02.dbf