Thursday, 16 December 2021

RMAN - Full Backup on asm disk group and script to copy backup from asm disk group to local disk

RMAN - Full Backup on asm disk group  and script to copy  backup from asm disk group to local disk

  • Login asmcmd console and create directory fro backup on shared storage 
  • Add controlfile snapshot location on ASM disk group.
  • Create full rman backup script mentioning asm backup location and Connect rman or shedule script in corntab for backup 
  • Check backup status on disks
  • Script to copy rman backup to local disk from asm diskgroup 


  • Login and create backup directory on asm disk group 

 grid@srv1:/home/oracle> . oraenv

ORACLE_SID = [rac1] ? +ASM1

The Oracle base has been changed from /u01/app/oracle to /u01/app/grid

grid@srv1:/home/oracle> asmcmd

ASMCMD> lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512   4096  1048576     24573    20095                0           20095              0             Y  CRS/

MOUNTED  EXTERN  N         512   4096  1048576     15359    13098                0           13098              0             N  DATA/

MOUNTED  EXTERN  N         512   4096  1048576     15359    14617                0           14617              0             N  FRA/


ASMCMD> mkdir rmanbkp

ASMCMD> pwd

+FRA/rmanbkp


ASMCMD> mkdir rmnan_snapshot

ASMCMD> ls

RAC/

rmanbkp/

rmnan_snapshot/

ASMCMD> rm -f rmnan_snapshot/

ASMCMD> mkdir rman_snapshot

ASMCMD> ls

RAC/

rman_snapshot/

rmanbkp/

ASMCMD> cd rman_snapshot/

ASMCMD> pwd

+FRA/rman_snapshot

ASMCMD> ls

snapcf_rac1.f


  • Add controlfile snapshot location on ASM disk group.

oracle@srv1:~> rman target /


Recovery Manager: Release 12.1.0.2.0 - Production on Wed Dec 8 13:38:11 2021


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


connected to target database: RAC (DBID=2666656136)


RMAN> show all ;


using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name RAC 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 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_rac1.f'; # default


RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/rman_snapshot/snapcf_rac1.f';


new RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/rman_snapshot/snapcf_rac1.f';

new RMAN configuration parameters are successfully stored


RMAN>  show all;


RMAN configuration parameters for database with db_unique_name RAC 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 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/rman_snapshot/snapcf_rac1.f';


RMAN>


  • Add backup location on full rman backup script

run

{

allocate channel c1 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

allocate channel c2 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

allocate channel c3 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

crosscheck backup;

crosscheck archivelog all;

report obsolete;

delete noprompt obsolete;

sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';

BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;

#backup full database format '+FRA/rmanbkp/%d_%U.bckp' plus archivelog;

copy current controlfile to '+FRA/rmanbkp/control_%d_%T.bak';

backup current controlfile for standby format '+FRA/rmanbkp/standbycontrol_%d_%U.ctl';

release channel c1;

release channel c2;

release channel c3;

}




  • Login into rman console and run rman backup command 

RMAN> run

{

allocate channel c1 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

allocate channel c2 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

allocate channel c3 device type disk format '+FRA/rmanbkp/Backup_%d_DB_%u_%s_%p_%T';

crosscheck backup;

crosscheck archivelog all;

report obsolete;

delete noprompt obsolete;

sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';

BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;

#backup full database format '+FRA/rmanbkp/%d_%U.bckp' plus archivelog;

copy current controlfile to '+FRA/rmanbkp/control_%d_%T.bak';

backup current controlfile for standby format '+FRA/rmanbkp/standbycontrol_%d_%U.ctl';

release channel c1;

release channel c2;

release channel c3;

}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18>


allocated channel: c1

channel c1: SID=55 instance=rac1 device type=DISK


allocated channel: c2

channel c2: SID=72 instance=rac1 device type=DISK


allocated channel: c3

channel c3: SID=1 instance=rac1 device type=DISK


specification does not match any backup in the repository


validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_1_seq_7.262.1078674321 RECID=2 STAMP=1078674321

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_1_seq_8.263.1078674333 RECID=3 STAMP=1078674333

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_1_seq_9.264.1078675051 RECID=4 STAMP=1078675051

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_1_seq_10.265.1078675053 RECID=5 STAMP=1078675052

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_1_seq_11.268.1078688249 RECID=8 STAMP=1078688248

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_26/thread_1_seq_12.269.1078917195 RECID=9 STAMP=1078917194

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_26/thread_1_seq_13.270.1078917195 RECID=10 STAMP=1078917194

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_26/thread_1_seq_14.271.1078917197 RECID=11 STAMP=1078917196

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_15.273.1079090839 RECID=13 STAMP=1079090839

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_16.274.1079095565 RECID=14 STAMP=1079095565

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_17.277.1079110283 RECID=17 STAMP=1079110284

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_18.278.1079110285 RECID=18 STAMP=1079110284

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_19.279.1079110287 RECID=19 STAMP=1079110286

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_20.280.1079112333 RECID=20 STAMP=1079112333

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_21.281.1079112335 RECID=21 STAMP=1079112334

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_22.283.1079113853 RECID=23 STAMP=1079113852

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_23.284.1079113853 RECID=24 STAMP=1079113853

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_1_seq_24.288.1079116217 RECID=28 STAMP=1079116216

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_25.289.1082547331 RECID=29 STAMP=1082547331

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_26.292.1082550533 RECID=32 STAMP=1082550533

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_27.295.1082550703 RECID=35 STAMP=1082550703

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_28.297.1082551223 RECID=37 STAMP=1082551222

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_29.299.1082566131 RECID=39 STAMP=1082566130

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_1_seq_30.300.1082566131 RECID=40 STAMP=1082566131

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_14/thread_1_seq_31.305.1083238257 RECID=45 STAMP=1083238257

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_32.306.1083413523 RECID=46 STAMP=1083413523

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_33.309.1083416351 RECID=49 STAMP=1083416351

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_34.310.1083416351 RECID=50 STAMP=1083416351

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_35.311.1083417811 RECID=51 STAMP=1083417811

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_36.312.1083417813 RECID=52 STAMP=1083417812

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_1_seq_37.314.1083418143 RECID=54 STAMP=1083418143

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_38.315.1083503419 RECID=55 STAMP=1083503419

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_39.320.1083503425 RECID=60 STAMP=1083503424

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_40.321.1083505803 RECID=61 STAMP=1083505803

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_41.322.1083506295 RECID=62 STAMP=1083506295

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_42.323.1083506455 RECID=63 STAMP=1083506454

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_43.328.1083506461 RECID=68 STAMP=1083506460

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_44.329.1083506577 RECID=69 STAMP=1083506576

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_1_seq_45.330.1083506577 RECID=70 STAMP=1083506577

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_22/thread_1_seq_46.332.1083940403 RECID=72 STAMP=1083940402

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_22/thread_1_seq_47.334.1083940403 RECID=74 STAMP=1083940404

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_1_seq_48.339.1084386101 RECID=79 STAMP=1084386101

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_1_seq_49.340.1084386121 RECID=80 STAMP=1084386121

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_07/thread_1_seq_50.341.1085330155 RECID=81 STAMP=1085330155

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_07/thread_1_seq_51.342.1085330181 RECID=82 STAMP=1085330180

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_08/thread_1_seq_52.343.1085404173 RECID=83 STAMP=1085404173

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_08/thread_1_seq_53.344.1085413929 RECID=84 STAMP=1085413929

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_1_seq_54.347.1086529789 RECID=87 STAMP=1086529790

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_1_seq_55.348.1086529791 RECID=88 STAMP=1086529790

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_1_seq_56.353.1086529815 RECID=93 STAMP=1086529815

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_1_seq_57.354.1086529835 RECID=94 STAMP=1086529835

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_28/thread_1_seq_58.355.1087135159 RECID=95 STAMP=1087135158

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_10/thread_1_seq_59.356.1088276599 RECID=96 STAMP=1088276598

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_10/thread_1_seq_60.357.1088279215 RECID=97 STAMP=1088279215

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_61.358.1089204019 RECID=98 STAMP=1089204018

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_62.359.1089204019 RECID=99 STAMP=1089204019

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_63.360.1089204021 RECID=100 STAMP=1089204020

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_64.361.1089204021 RECID=101 STAMP=1089204020

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_65.363.1089220877 RECID=103 STAMP=1089220878

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_66.365.1089220879 RECID=105 STAMP=1089220878

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_1_seq_67.367.1089228519 RECID=107 STAMP=1089228519

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_12_08/thread_1_seq_68.369.1090757115 RECID=108 STAMP=1090757115

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_2_seq_1.261.1078674311 RECID=1 STAMP=1078674310

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_2_seq_2.266.1078676779 RECID=6 STAMP=1078676779

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_23/thread_2_seq_3.267.1078676781 RECID=7 STAMP=1078676780

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_4.272.1079090839 RECID=12 STAMP=1079090838

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_5.275.1079095569 RECID=15 STAMP=1079095568

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_6.276.1079095569 RECID=16 STAMP=1079095568

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_7.282.1079112335 RECID=22 STAMP=1079112334

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_8.285.1079113855 RECID=25 STAMP=1079113855

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_9.286.1079115391 RECID=26 STAMP=1079115390

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_07_28/thread_2_seq_10.287.1079115391 RECID=27 STAMP=1079115391

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_11.290.1082547335 RECID=30 STAMP=1082547334

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_12.291.1082547335 RECID=31 STAMP=1082547334

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_13.293.1082550701 RECID=33 STAMP=1082550702

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_14.294.1082550703 RECID=34 STAMP=1082550702

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_15.296.1082551221 RECID=36 STAMP=1082551221

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_06/thread_2_seq_16.298.1082551223 RECID=38 STAMP=1082551222

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_14/thread_2_seq_17.301.1083238249 RECID=41 STAMP=1083238249

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_14/thread_2_seq_18.302.1083238249 RECID=42 STAMP=1083238249

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_14/thread_2_seq_19.303.1083238255 RECID=43 STAMP=1083238254

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_14/thread_2_seq_20.304.1083238255 RECID=44 STAMP=1083238255

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_2_seq_21.307.1083413525 RECID=47 STAMP=1083413525

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_2_seq_22.308.1083413525 RECID=48 STAMP=1083413525

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_16/thread_2_seq_23.313.1083417813 RECID=53 STAMP=1083417813

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_24.316.1083503419 RECID=56 STAMP=1083503419

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_25.317.1083503419 RECID=57 STAMP=1083503419

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_26.318.1083503421 RECID=58 STAMP=1083503421

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_27.319.1083503421 RECID=59 STAMP=1083503421

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_28.324.1083506455 RECID=64 STAMP=1083506455

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_29.325.1083506455 RECID=65 STAMP=1083506455

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_30.326.1083506457 RECID=66 STAMP=1083506457

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_17/thread_2_seq_31.327.1083506457 RECID=67 STAMP=1083506457

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_22/thread_2_seq_32.331.1083939803 RECID=71 STAMP=1083939803

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_22/thread_2_seq_33.333.1083940403 RECID=73 STAMP=1083940403

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_2_seq_34.335.1084386097 RECID=75 STAMP=1084386096

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_2_seq_35.336.1084386097 RECID=76 STAMP=1084386096

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_2_seq_36.337.1084386099 RECID=77 STAMP=1084386098

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_09_27/thread_2_seq_37.338.1084386099 RECID=78 STAMP=1084386099

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_08/thread_2_seq_38.345.1085413931 RECID=85 STAMP=1085413931

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_08/thread_2_seq_39.346.1085413931 RECID=86 STAMP=1085413931

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_2_seq_40.349.1086529791 RECID=89 STAMP=1086529790

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_2_seq_41.350.1086529791 RECID=90 STAMP=1086529790

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_2_seq_42.351.1086529793 RECID=91 STAMP=1086529793

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_10_21/thread_2_seq_43.352.1086529793 RECID=92 STAMP=1086529793

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_2_seq_44.362.1089204023 RECID=102 STAMP=1089204022

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_2_seq_45.364.1089220879 RECID=104 STAMP=1089220878

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_11_21/thread_2_seq_46.366.1089225091 RECID=106 STAMP=1089225092

validation succeeded for archived log

archived log file name=+FRA/RAC/ARCHIVELOG/2021_12_08/thread_2_seq_47.368.1090757115 RECID=109 STAMP=1090757115

Crosschecked 109 objects



RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

no obsolete backups found


RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

no obsolete backups found


sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT



Starting backup at 08-DEC-21

current log archived

channel c1: starting compressed archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=7 RECID=2 STAMP=1078674321

input archived log thread=2 sequence=1 RECID=1 STAMP=1078674310

input archived log thread=1 sequence=8 RECID=3 STAMP=1078674333

input archived log thread=1 sequence=9 RECID=4 STAMP=1078675051

input archived log thread=2 sequence=2 RECID=6 STAMP=1078676779

input archived log thread=1 sequence=10 RECID=5 STAMP=1078675052

input archived log thread=1 sequence=11 RECID=8 STAMP=1078688248

input archived log thread=2 sequence=3 RECID=7 STAMP=1078676780

input archived log thread=1 sequence=12 RECID=9 STAMP=1078917194

input archived log thread=1 sequence=13 RECID=10 STAMP=1078917194

input archived log thread=2 sequence=4 RECID=12 STAMP=1079090838

input archived log thread=1 sequence=14 RECID=11 STAMP=1078917196

input archived log thread=1 sequence=15 RECID=13 STAMP=1079090839

input archived log thread=1 sequence=16 RECID=14 STAMP=1079095565

input archived log thread=2 sequence=5 RECID=15 STAMP=1079095568

input archived log thread=2 sequence=6 RECID=16 STAMP=1079095568

input archived log thread=1 sequence=17 RECID=17 STAMP=1079110284

input archived log thread=1 sequence=18 RECID=18 STAMP=1079110284

input archived log thread=2 sequence=7 RECID=22 STAMP=1079112334

input archived log thread=1 sequence=19 RECID=19 STAMP=1079110286

input archived log thread=1 sequence=20 RECID=20 STAMP=1079112333

input archived log thread=1 sequence=21 RECID=21 STAMP=1079112334

input archived log thread=2 sequence=8 RECID=25 STAMP=1079113855

input archived log thread=1 sequence=22 RECID=23 STAMP=1079113852

input archived log thread=1 sequence=23 RECID=24 STAMP=1079113853

input archived log thread=2 sequence=9 RECID=26 STAMP=1079115390

input archived log thread=1 sequence=24 RECID=28 STAMP=1079116216

channel c1: starting piece 1 at 08-DEC-21

channel c2: starting compressed archived log backup set

channel c2: specifying archived log(s) in backup set

input archived log thread=2 sequence=10 RECID=27 STAMP=1079115391

input archived log thread=2 sequence=11 RECID=30 STAMP=1082547334

input archived log thread=1 sequence=25 RECID=29 STAMP=1082547331

input archived log thread=2 sequence=12 RECID=31 STAMP=1082547334

input archived log thread=1 sequence=26 RECID=32 STAMP=1082550533

input archived log thread=1 sequence=27 RECID=35 STAMP=1082550703

input archived log thread=2 sequence=13 RECID=33 STAMP=1082550702

input archived log thread=2 sequence=14 RECID=34 STAMP=1082550702

input archived log thread=1 sequence=28 RECID=37 STAMP=1082551222

input archived log thread=2 sequence=15 RECID=36 STAMP=1082551221

input archived log thread=2 sequence=16 RECID=38 STAMP=1082551222

input archived log thread=1 sequence=29 RECID=39 STAMP=1082566130

input archived log thread=2 sequence=17 RECID=41 STAMP=1083238249

input archived log thread=1 sequence=30 RECID=40 STAMP=1082566131

input archived log thread=2 sequence=18 RECID=42 STAMP=1083238249

input archived log thread=1 sequence=31 RECID=45 STAMP=1083238257

input archived log thread=2 sequence=19 RECID=43 STAMP=1083238254

input archived log thread=2 sequence=20 RECID=44 STAMP=1083238255

input archived log thread=1 sequence=32 RECID=46 STAMP=1083413523

input archived log thread=2 sequence=21 RECID=47 STAMP=1083413525

input archived log thread=2 sequence=22 RECID=48 STAMP=1083413525

input archived log thread=1 sequence=33 RECID=49 STAMP=1083416351

input archived log thread=2 sequence=23 RECID=53 STAMP=1083417813

input archived log thread=1 sequence=34 RECID=50 STAMP=1083416351

input archived log thread=1 sequence=35 RECID=51 STAMP=1083417811

input archived log thread=1 sequence=36 RECID=52 STAMP=1083417812

input archived log thread=2 sequence=24 RECID=56 STAMP=1083503419

input archived log thread=1 sequence=37 RECID=54 STAMP=1083418143

input archived log thread=1 sequence=38 RECID=55 STAMP=1083503419

input archived log thread=2 sequence=25 RECID=57 STAMP=1083503419

input archived log thread=1 sequence=39 RECID=60 STAMP=1083503424

input archived log thread=2 sequence=26 RECID=58 STAMP=1083503421

input archived log thread=2 sequence=27 RECID=59 STAMP=1083503421

input archived log thread=1 sequence=40 RECID=61 STAMP=1083505803

input archived log thread=1 sequence=41 RECID=62 STAMP=1083506295

input archived log thread=2 sequence=28 RECID=64 STAMP=1083506455

input archived log thread=1 sequence=42 RECID=63 STAMP=1083506454

input archived log thread=2 sequence=29 RECID=65 STAMP=1083506455

channel c2: starting piece 1 at 08-DEC-21

channel c3: starting compressed archived log backup set

channel c3: specifying archived log(s) in backup set

input archived log thread=1 sequence=43 RECID=68 STAMP=1083506460

input archived log thread=2 sequence=30 RECID=66 STAMP=1083506457

input archived log thread=2 sequence=31 RECID=67 STAMP=1083506457

input archived log thread=1 sequence=44 RECID=69 STAMP=1083506576

input archived log thread=2 sequence=32 RECID=71 STAMP=1083939803

input archived log thread=1 sequence=45 RECID=70 STAMP=1083506577

input archived log thread=2 sequence=33 RECID=73 STAMP=1083940403

input archived log thread=1 sequence=46 RECID=72 STAMP=1083940402

input archived log thread=1 sequence=47 RECID=74 STAMP=1083940404

input archived log thread=2 sequence=34 RECID=75 STAMP=1084386096

input archived log thread=2 sequence=35 RECID=76 STAMP=1084386096

input archived log thread=1 sequence=48 RECID=79 STAMP=1084386101

input archived log thread=2 sequence=36 RECID=77 STAMP=1084386098

input archived log thread=2 sequence=37 RECID=78 STAMP=1084386099

input archived log thread=1 sequence=49 RECID=80 STAMP=1084386121

input archived log thread=1 sequence=50 RECID=81 STAMP=1085330155

input archived log thread=1 sequence=51 RECID=82 STAMP=1085330180

input archived log thread=1 sequence=52 RECID=83 STAMP=1085404173

input archived log thread=1 sequence=53 RECID=84 STAMP=1085413929

input archived log thread=2 sequence=38 RECID=85 STAMP=1085413931

input archived log thread=2 sequence=39 RECID=86 STAMP=1085413931

input archived log thread=1 sequence=54 RECID=87 STAMP=1086529790

input archived log thread=2 sequence=40 RECID=89 STAMP=1086529790

input archived log thread=1 sequence=55 RECID=88 STAMP=1086529790

input archived log thread=2 sequence=41 RECID=90 STAMP=1086529790

input archived log thread=1 sequence=56 RECID=93 STAMP=1086529815

input archived log thread=2 sequence=42 RECID=91 STAMP=1086529793

input archived log thread=2 sequence=43 RECID=92 STAMP=1086529793

input archived log thread=1 sequence=57 RECID=94 STAMP=1086529835

input archived log thread=1 sequence=58 RECID=95 STAMP=1087135158

input archived log thread=1 sequence=59 RECID=96 STAMP=1088276598

input archived log thread=1 sequence=60 RECID=97 STAMP=1088279215

input archived log thread=1 sequence=61 RECID=98 STAMP=1089204018

input archived log thread=1 sequence=62 RECID=99 STAMP=1089204019

input archived log thread=2 sequence=44 RECID=102 STAMP=1089204022

input archived log thread=1 sequence=63 RECID=100 STAMP=1089204020

input archived log thread=1 sequence=64 RECID=101 STAMP=1089204020

input archived log thread=2 sequence=45 RECID=104 STAMP=1089220878

channel c3: starting piece 1 at 08-DEC-21

channel c1: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_010g7e6d_1_1_20211208 tag=TAG20211208T134236 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:08

channel c1: starting compressed archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=65 RECID=103 STAMP=1089220878

input archived log thread=1 sequence=66 RECID=105 STAMP=1089220878

input archived log thread=2 sequence=46 RECID=106 STAMP=1089225092

input archived log thread=2 sequence=47 RECID=109 STAMP=1090757115

input archived log thread=1 sequence=67 RECID=107 STAMP=1089228519

input archived log thread=1 sequence=68 RECID=108 STAMP=1090757115

input archived log thread=2 sequence=48 RECID=111 STAMP=1090762950

input archived log thread=1 sequence=69 RECID=110 STAMP=1090762949

input archived log thread=1 sequence=70 RECID=112 STAMP=1090762956

input archived log thread=2 sequence=49 RECID=113 STAMP=1090762956

channel c1: starting piece 1 at 08-DEC-21

channel c2: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_020g7e6d_2_1_20211208 tag=TAG20211208T134236 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:07

channel c3: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_030g7e6e_3_1_20211208 tag=TAG20211208T134236 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:07

channel c1: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_040g7e6l_4_1_20211208 tag=TAG20211208T134236 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:03

Finished backup at 08-DEC-21


Starting backup at 08-DEC-21

channel c1: starting compressed full datafile backup set

channel c1: specifying datafile(s) in backup set

input datafile file number=00001 name=+DATA/RAC/DATAFILE/system.258.1078674039

channel c1: starting piece 1 at 08-DEC-21

channel c2: starting compressed full datafile backup set

channel c2: specifying datafile(s) in backup set

input datafile file number=00003 name=+DATA/RAC/DATAFILE/sysaux.257.1078674013

input datafile file number=00006 name=+DATA/RAC/DATAFILE/users.259.1078674073

channel c2: starting piece 1 at 08-DEC-21

channel c3: starting compressed full datafile backup set

channel c3: specifying datafile(s) in backup set

input datafile file number=00004 name=+DATA/RAC/DATAFILE/undotbs1.260.1078674075

input datafile file number=00005 name=+DATA/RAC/DATAFILE/undotbs2.265.1078674231

channel c3: starting piece 1 at 08-DEC-21

channel c3: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_070g7e6p_7_1_20211208 tag=TAG20211208T134249 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:01

channel c3: starting compressed full datafile backup set

channel c3: specifying datafile(s) in backup set

including current control file in backup set

channel c3: starting piece 1 at 08-DEC-21

channel c3: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_080g7e6q_8_1_20211208 tag=TAG20211208T134249 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:01

channel c3: starting compressed full datafile backup set

channel c3: specifying datafile(s) in backup set

including current SPFILE in backup set

channel c3: starting piece 1 at 08-DEC-21

channel c3: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_090g7e6t_9_1_20211208 tag=TAG20211208T134249 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:01

channel c1: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_050g7e6p_5_1_20211208 tag=TAG20211208T134249 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:29

channel c2: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_060g7e6p_6_1_20211208 tag=TAG20211208T134249 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:29

Finished backup at 08-DEC-21


Starting backup at 08-DEC-21

current log archived

channel c1: starting compressed archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=71 RECID=114 STAMP=1090762999

channel c1: starting piece 1 at 08-DEC-21

channel c2: starting compressed archived log backup set

channel c2: specifying archived log(s) in backup set

input archived log thread=2 sequence=50 RECID=115 STAMP=1090762999

channel c2: starting piece 1 at 08-DEC-21

channel c1: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_0a0g7e7p_10_1_20211208 tag=TAG20211208T134321 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

channel c2: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/backup_rac_db_0b0g7e7p_11_1_20211208 tag=TAG20211208T134321 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:01

Finished backup at 08-DEC-21


Starting backup at 08-DEC-21

channel c1: starting datafile copy

copying current control file

output file name=+FRA/rmanbkp/control_rac_20211208.bak tag=TAG20211208T134323 RECID=1 STAMP=1090763004

channel c1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 08-DEC-21


Starting backup at 08-DEC-21

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 08-DEC-21

channel c1: finished piece 1 at 08-DEC-21

piece handle=+FRA/rmanbkp/standbycontrol_rac_0d0g7e7t_1_1.ctl tag=TAG20211208T134325 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-DEC-21


released channel: c1


released channel: c2


released channel: c3


RMAN>


  • Copy Rman backup form asm backup location to local disk  (schedule script using grid user)


grid@srv1:/u01/asm_rman_cp> cat asm_smrpodbrman_backup.sh

#!/bin/bash


#


# This script copies files from FRA on ASM to local disk


#


export ORACLE_SID=+ASM1


export ORACLE_HOME=/u01/app/12.1.0/grid  ##{Grid OH}

export PATH=$ORACLE_HOME/perl/bin:$PATH

ASMLS=/u01/asm_rman_cp/asm_rman.txt ##{ASM files list}


FRA=+FRA/rmanbkp ##{source location of files}


LOCALBACKUPDIR=/u01/asm_rman_cp  ##{destination filesystem}


LOG=/u01/asm_rman_cp/asm_grid_smrpod.txt ##{log file}


#


# Get the list of files


#


$ORACLE_HOME/bin/asmcmd > $ASMLS <<EOF


ls $FRA


exit


EOF


#


# Clean the list by removing "ASMCMD>"


#


sed -i 's/ASMCMD> //g' $ASMLS


##cat $ASMLS


echo `date` > $LOG


#


# Copy files one by one


#




for FILENAME in `cat $ASMLS`


do


if [[ ! -f $LOCALBACKUPDIR/${FILENAME} ]]


then


$ORACLE_HOME/bin/asmcmd >> $LOG <<EOF


cp $FRA/$FILENAME $LOCALBACKUPDIR


EOF


fi


done


echo `date` >> $LOG


  • Check the rman backup files on local disk location 

grid@srv1:/u01/asm_rman_cp> ll

total 462760

-rw-r--r-- 1 grid oinstall      1988 Dec  8 14:19 asm_grid_smrpod.txt

-rw-r--r-- 1 grid oinstall       459 Dec  8 14:19 asm_rman.txt

-rwxrwxr-x 1 grid oinstall       841 Dec  8 14:19 asm_smrpodbrman_backup.sh

-rw-r----- 1 grid oinstall  40596992 Dec  8 14:19 backup_rac_db_010g7e6d_1_1_20211208

-rw-r----- 1 grid oinstall  25184768 Dec  8 14:19 backup_rac_db_020g7e6d_2_1_20211208

-rw-r----- 1 grid oinstall  19389952 Dec  8 14:19 backup_rac_db_030g7e6e_3_1_20211208

-rw-r----- 1 grid oinstall  13932032 Dec  8 14:19 backup_rac_db_040g7e6l_4_1_20211208

-rw-r----- 1 grid oinstall 214990848 Dec  8 14:19 backup_rac_db_050g7e6p_5_1_20211208

-rw-r----- 1 grid oinstall 118374400 Dec  8 14:19 backup_rac_db_060g7e6p_6_1_20211208

-rw-r----- 1 grid oinstall   1720320 Dec  8 14:19 backup_rac_db_070g7e6p_7_1_20211208

-rw-r----- 1 grid oinstall   1130496 Dec  8 14:19 backup_rac_db_080g7e6q_8_1_20211208

-rw-r----- 1 grid oinstall     98304 Dec  8 14:19 backup_rac_db_090g7e6t_9_1_20211208

-rw-r----- 1 grid oinstall      3584 Dec  8 14:19 backup_rac_db_0a0g7e7p_10_1_20211208

-rw-r----- 1 grid oinstall      3072 Dec  8 14:19 backup_rac_db_0b0g7e7p_11_1_20211208

-rw-r----- 1 grid oinstall  19185664 Dec  8 14:19 control_rac_20211208.bak

-rw-r----- 1 grid oinstall  19234816 Dec  8 14:19 standbycontrol_rac_0d0g7e7t_1_1.ctl

grid@srv1:/u01/asm_rman_cp>

No comments:

Post a Comment