Monday, 15 July 2019

RMAN Logs and append rman target / log=/u01/Backup/rman_backup.log append

########################### RMAN LOG #################################

[oracle@srv1 u01]$ rman target / log=/u01/Backup/rman_backup.log append
RMAN> run
{
allocate channel c1 device type disk format '/u01/Backup/Backup_%d_DB_%u_%s_%p_%T';
crosscheck backup;
crosscheck archivelog all;
report obsolete;
delete noprompt obsolete;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
2> 3> 4> 5> 6> 7> 8> backup full database format '/u01/Backup/%d_%U.bckp' plus archivelog;
copy current controlfile to '/u01/Backup/control01_%U.bak';
backup current controlfile for standby format '/u01/Backup/standbycontrol_%U.ctl';
release channel c1;
}9> 10> 11> 12> 13>

RMAN> RMAN>

[root@srv2 Backup]# cat rman_backup.log

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jul 5 18:51:32 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RAC (DBID=2599942250)

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=57 instance=rac1 device type=DISK

crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/RAC_24u5tglc_1_1.bckp RECID=59 STAMP=1012843180
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/Backup_RAC_DB_26u5tgsa_70_1_20190705 RECID=61 STAMP=1012843402
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/Backup_RAC_DB_29u5th11_73_1_20190705 RECID=63 STAMP=1012843553
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/RAC_2au5th13_1_1.bckp RECID=64 STAMP=1012843555
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/Backup_RAC_DB_2cu5thh4_76_1_20190705 RECID=65 STAMP=1012844068
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/RAC_2du5thh9_1_1.bckp RECID=66 STAMP=1012844073
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/Backup_RAC_DB_2fu5thq5_79_1_20190705 RECID=68 STAMP=1012844358
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/Backup/standbycontrol_2hu5thqm_1_1.ctl RECID=69 STAMP=1012844378
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/Backup/Backup_RAC_DB_2iu5tlri_82_1_20190705 RECID=70 STAMP=1012848499
Crosschecked 9 objects


validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_118.408.1012843399 RECID=210 STAMP=1012843399
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_119.410.1012843541 RECID=212 STAMP=1012843540
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_120.412.1012843547 RECID=214 STAMP=1012843546
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_121.415.1012844051 RECID=217 STAMP=1012844051
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_122.416.1012844063 RECID=218 STAMP=1012844062
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_123.420.1012844355 RECID=221 STAMP=1012844355
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_124.421.1012848487 RECID=222 STAMP=1012848487
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_1_seq_125.261.1012848493 RECID=224 STAMP=1012848493
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_100.407.1012843401 RECID=211 STAMP=1012843400
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_101.411.1012843541 RECID=213 STAMP=1012843541
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_102.413.1012843549 RECID=215 STAMP=1012843549
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_103.414.1012844051 RECID=216 STAMP=1012844050
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_104.417.1012844065 RECID=219 STAMP=1012844065
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_105.419.1012844355 RECID=220 STAMP=1012844354
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_106.422.1012848487 RECID=223 STAMP=1012848488
validation succeeded for archived log
archived log file name=+FRA/RAC/ARCHIVELOG/2019_07_05/thread_2_seq_107.262.1012848495 RECID=225 STAMP=1012848494
Crosschecked 16 objects


RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     1      04-JUL-19          /u01/Backup/control01_cf_D-RAC_id-2599942250_0du5r0t3.bak
Control File Copy     2      04-JUL-19          /u01/Backup/control01_cf_D-RAC_id-2599942250_10u5r2a2.bak

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     1      04-JUL-19          /u01/Backup/control01_cf_D-RAC_id-2599942250_0du5r0t3.bak
Control File Copy     2      04-JUL-19          /u01/Backup/control01_cf_D-RAC_id-2599942250_10u5r2a2.bak

RMAN-06207: WARNING: 2 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Control File Copy /u01/Backup/control01_cf_D-RAC_id-2599942250_0du5r0t3.bak
RMAN-06214: Control File Copy /u01/Backup/control01_cf_D-RAC_id-2599942250_10u5r2a2.bak


sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT


Starting backup at 05-JUL-19
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=118 RECID=210 STAMP=1012843399
input archived log thread=2 sequence=100 RECID=211 STAMP=1012843400
input archived log thread=1 sequence=119 RECID=212 STAMP=1012843540
input archived log thread=2 sequence=101 RECID=213 STAMP=1012843541
input archived log thread=1 sequence=120 RECID=214 STAMP=1012843546
input archived log thread=2 sequence=102 RECID=215 STAMP=1012843549
input archived log thread=1 sequence=121 RECID=217 STAMP=1012844051
input archived log thread=2 sequence=103 RECID=216 STAMP=1012844050
input archived log thread=2 sequence=104 RECID=219 STAMP=1012844065
input archived log thread=1 sequence=122 RECID=218 STAMP=1012844062
input archived log thread=1 sequence=123 RECID=221 STAMP=1012844355
input archived log thread=2 sequence=105 RECID=220 STAMP=1012844354
input archived log thread=2 sequence=106 RECID=223 STAMP=1012848488
input archived log thread=1 sequence=124 RECID=222 STAMP=1012848487
input archived log thread=1 sequence=125 RECID=224 STAMP=1012848493
input archived log thread=2 sequence=107 RECID=225 STAMP=1012848494
input archived log thread=1 sequence=126 RECID=226 STAMP=1012848708
input archived log thread=2 sequence=108 RECID=227 STAMP=1012848709
input archived log thread=1 sequence=127 RECID=228 STAMP=1012848721
input archived log thread=2 sequence=109 RECID=229 STAMP=1012848721
channel c1: starting piece 1 at 05-JUL-19
channel c1: finished piece 1 at 05-JUL-19
piece handle=/u01/Backup/Backup_RAC_DB_2ku5tm2n_84_1_20190705 tag=TAG20190705T185207 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-JUL-19

Starting backup at 05-JUL-19
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/RAC/DATAFILE/sysaux.257.1011959959
input datafile file number=00001 name=+DATA/RAC/DATAFILE/system.258.1011960053
input datafile file number=00004 name=+DATA/RAC/DATAFILE/undotbs1.260.1011960171
input datafile file number=00005 name=+DATA/RAC/DATAFILE/undotbs2.265.1011960859
input datafile file number=00006 name=+DATA/RAC/DATAFILE/users.259.1011960169
channel c1: starting piece 1 at 05-JUL-19
channel c1: finished piece 1 at 05-JUL-19
piece handle=/u01/Backup/RAC_2lu5tm2q_1_1.bckp tag=TAG20190705T185210 comment=NONE
channel c1: backup set complete, elapsed time: 00:03:35
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel c1: starting piece 1 at 05-JUL-19
channel c1: finished piece 1 at 05-JUL-19
piece handle=/u01/Backup/RAC_2mu5tm9i_1_1.bckp tag=TAG20190705T185210 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 05-JUL-19

Starting backup at 05-JUL-19
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=128 RECID=230 STAMP=1012848953
input archived log thread=2 sequence=110 RECID=231 STAMP=1012848954
channel c1: starting piece 1 at 05-JUL-19
channel c1: finished piece 1 at 05-JUL-19
piece handle=/u01/Backup/Backup_RAC_DB_2nu5tma0_87_1_20190705 tag=TAG20190705T185559 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-JUL-19

Starting backup at 05-JUL-19
channel c1: starting datafile copy
copying current control file
output file name=/u01/Backup/control01_cf_D-RAC_id-2599942250_2ou5tma1.bak tag=TAG20190705T185601 RECID=8 STAMP=1012848973
channel c1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 05-JUL-19

Starting backup at 05-JUL-19
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including standby control file in backup set
channel c1: starting piece 1 at 05-JUL-19
channel c1: finished piece 1 at 05-JUL-19
piece handle=/u01/Backup/standbycontrol_2pu5tmah_1_1.ctl tag=TAG20190705T185616 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 05-JUL-19

released channel: c1

RMAN>
[root@srv2 Backup]#

########################### CMDFILE ####################################

[oracle@srv1 Backup]$ rman target / cmdfile=/u01/Backup/rman_script.rcvd

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jul 5 19:01:44 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RAC (DBID=2599942250)

[root@srv2 Backup]# cat rman_script.rcvd
run
{
allocate channel c1 device type disk format '/u01/Backup/Backup_%d_DB_%u_%s_%p_%T';
crosscheck backup;
crosscheck archivelog all;
report obsolete;
delete noprompt obsolete;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
backup full database format '/u01/Backup/%d_%U.bckp' plus archivelog;
copy current controlfile to '/u01/Backup/control01_%U.bak';
backup current controlfile for standby format '/u01/Backup/standbycontrol_%U.ctl';
release channel c1;
}
[root@srv2 Backup]#




No comments:

Post a Comment