RMAN Backup - ArchivelogHow to take archivelog backups using RMAN. Taking Archivelog Backup : Archivelog known to controlfile RMAN> list archivelog all; Using target database control file instead of recovery catalog List of Archived Log Copies for database with db_unique_name PRIM ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - --------- 1 1 1 A 05-JAN-24 Name: /u01/app/oracle/fast_recovery_area/prim/PRIM/archivelog/2024_01_06/o1_mf_1_1_lskn3r16_.arc 2 1 2 A 06-JAN-24 Name: /u01/app/oracle/fast_recovery_area/prim/PRIM/archivelog/2024_01_06/o1_mf_1_2_lskoogny_.arc 3 1 3 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_3_1157471808.dbf 6 1 4 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_4_1157471808.dbf 8 1 5 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_5_1157471808.dbf 10 1 6 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_6_1157471808.dbf 13 1 7 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_7_1157471808.dbf 15 1 8 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_8_1157471808.dbf 17 1 9 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_9_1157471808.dbf 18 1 10 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_10_1157471808.dbf 20 1 11 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_11_1157471808.dbf 22 1 12 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_12_1157471808.dbf Backup all the archivelog : RMAN> backup archivelog all; Starting backup at 06-JAN-24 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=273 device type=DISK channel ORA_DISK_1: starting archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=1 RECID=1 STAMP=1157535057 input archived log thread=1 sequence=2 RECID=2 STAMP=1157536647 input archived log thread=1 sequence=3 RECID=3 STAMP=1157537577 input archived log thread=1 sequence=4 RECID=6 STAMP=1157537587 input archived log thread=1 sequence=5 RECID=8 STAMP=1157537708 input archived log thread=1 sequence=6 RECID=10 STAMP=1157537837 input archived log thread=1 sequence=7 RECID=13 STAMP=1157538914 input archived log thread=1 sequence=8 RECID=15 STAMP=1157538916 input archived log thread=1 sequence=9 RECID=17 STAMP=1157539380 input archived log thread=1 sequence=10 RECID=18 STAMP=1157541155 input archived log thread=1 sequence=11 RECID=20 STAMP=1157541156 input archived log thread=1 sequence=12 RECID=22 STAMP=1157543003 input archived log thread=1 sequence=13 RECID=24 STAMP=1157543018 input archived log thread=1 sequence=14 RECID=26 STAMP=1157543364 input archived log thread=1 sequence=15 RECID=29 STAMP=1157547930 input archived log thread=1 sequence=16 RECID=32 STAMP=1157548775 input archived log thread=1 sequence=17 RECID=33 STAMP=1157548775 input archived log thread=1 sequence=18 RECID=35 STAMP=1157549579 input archived log thread=1 sequence=19 RECID=37 STAMP=1157550170 channel ORA_DISK_1: starting piece 1 at 06-JAN-24 channel ORA_DISK_1: finished piece 1 at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/backupset/2024_01_06/o1_mf_annnn_TAG20240106T134252_lsl2w4m3_.bkp tag=TAG20240106T134252 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08 Finished backup at 06-JAN-24 Starting Control File and SPFILE Autobackup at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/autobackup/2024_01_06/o1_mf_s_1157550180_lsl2wfg0_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 06-JAN-24 RMAN> backup archivelog all not backed up 1 times; Starting backup at 06-JAN-24 current log archived using channel ORA_DISK_1 skipping archived logs of thread 1 from sequence 1 to 20; already backed up channel ORA_DISK_1: starting archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=21 RECID=40 STAMP=1157550285 channel ORA_DISK_1: starting piece 1 at 06-JAN-24 channel ORA_DISK_1: finished piece 1 at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/backupset/2024_01_06/o1_mf_annnn_TAG20240106T134445_lsl2zp2l_.bkp tag=TAG20240106T134445 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 06-JAN-24 Starting Control File and SPFILE Autobackup at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/autobackup/2024_01_06/o1_mf_s_1157550287_lsl2zqn0_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 06-JAN-24 Backup all the archivelog : RMAN> backup archivelog all delete input; Starting backup at 06-JAN-24 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=1 RECID=1 STAMP=1157535057 input archived log thread=1 sequence=2 RECID=2 STAMP=1157536647 input archived log thread=1 sequence=3 RECID=3 STAMP=1157537577 input archived log thread=1 sequence=4 RECID=6 STAMP=1157537587 input archived log thread=1 sequence=5 RECID=8 STAMP=1157537708 input archived log thread=1 sequence=6 RECID=10 STAMP=1157537837 input archived log thread=1 sequence=7 RECID=13 STAMP=1157538914 input archived log thread=1 sequence=8 RECID=15 STAMP=1157538916 input archived log thread=1 sequence=9 RECID=17 STAMP=1157539380 input archived log thread=1 sequence=10 RECID=18 STAMP=1157541155 input archived log thread=1 sequence=11 RECID=20 STAMP=1157541156 input archived log thread=1 sequence=12 RECID=22 STAMP=1157543003 input archived log thread=1 sequence=13 RECID=24 STAMP=1157543018 input archived log thread=1 sequence=14 RECID=26 STAMP=1157543364 input archived log thread=1 sequence=15 RECID=29 STAMP=1157547930 input archived log thread=1 sequence=16 RECID=32 STAMP=1157548775 input archived log thread=1 sequence=17 RECID=33 STAMP=1157548775 input archived log thread=1 sequence=18 RECID=35 STAMP=1157549579 input archived log thread=1 sequence=19 RECID=37 STAMP=1157550170 input archived log thread=1 sequence=20 RECID=38 STAMP=1157550252 input archived log thread=1 sequence=21 RECID=40 STAMP=1157550285 input archived log thread=1 sequence=22 RECID=42 STAMP=1157550356 channel ORA_DISK_1: starting piece 1 at 06-JAN-24 channel ORA_DISK_1: finished piece 1 at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/backupset/2024_01_06/o1_mf_annnn_TAG20240106T134556_lsl31wmg_.bkp tag=TAG20240106T134556 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03 channel ORA_DISK_1: deleting archived log(s) archived log file name=/u01/app/oracle/fast_recovery_area/prim/PRIM/archivelog/2024_01_06/o1_mf_1_1_lskn3r16_.arc RECID=1 STAMP=1157535057 archived log file name=/u01/app/oracle/fast_recovery_area/prim/PRIM/archivelog/2024_01_06/o1_mf_1_2_lskoogny_.arc RECID=2 STAMP=1157536647 archived log file name=/u01/app/oracle/oradata/1_3_1157471808.dbf RECID=3 STAMP=1157537577 archived log file name=/u01/app/oracle/oradata/1_4_1157471808.dbf RECID=6 STAMP=1157537587 archived log file name=/u01/app/oracle/oradata/1_5_1157471808.dbf RECID=8 STAMP=1157537708 archived log file name=/u01/app/oracle/oradata/1_6_1157471808.dbf RECID=10 STAMP=1157537837 archived log file name=/u01/app/oracle/oradata/1_7_1157471808.dbf RECID=13 STAMP=1157538914 archived log file name=/u01/app/oracle/oradata/1_8_1157471808.dbf RECID=15 STAMP=1157538916 archived log file name=/u01/app/oracle/oradata/1_9_1157471808.dbf RECID=17 STAMP=1157539380 archived log file name=/u01/app/oracle/oradata/1_10_1157471808.dbf RECID=18 STAMP=1157541155 archived log file name=/u01/app/oracle/oradata/1_11_1157471808.dbf RECID=20 STAMP=1157541156 archived log file name=/u01/app/oracle/oradata/1_12_1157471808.dbf RECID=22 STAMP=1157543003 archived log file name=/u01/app/oracle/oradata/1_13_1157471808.dbf RECID=24 STAMP=1157543018 archived log file name=/u01/app/oracle/oradata/1_14_1157471808.dbf RECID=26 STAMP=1157543364 archived log file name=/u01/app/oracle/oradata/1_15_1157471808.dbf RECID=29 STAMP=1157547930 archived log file name=/u01/app/oracle/oradata/1_16_1157471808.dbf RECID=32 STAMP=1157548775 archived log file name=/u01/app/oracle/oradata/1_17_1157471808.dbf RECID=33 STAMP=1157548775 archived log file name=/u01/app/oracle/oradata/1_18_1157471808.dbf RECID=35 STAMP=1157549579 archived log file name=/u01/app/oracle/oradata/1_19_1157471808.dbf RECID=37 STAMP=1157550170 archived log file name=/u01/app/oracle/oradata/1_20_1157471808.dbf RECID=38 STAMP=1157550252 archived log file name=/u01/app/oracle/oradata/1_21_1157471808.dbf RECID=40 STAMP=1157550285 archived log file name=/u01/app/oracle/oradata/1_22_1157471808.dbf RECID=42 STAMP=1157550356 Finished backup at 06-JAN-24 Starting Control File and SPFILE Autobackup at 06-JAN-24 piece handle=/u01/app/oracle/fast_recovery_area/prim/PRIM/autobackup/2024_01_06/o1_mf_s_1157550361_lsl32270_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 06-JAN-24 List Backed Up Archives : RMAN> list archivelog all backed up 1 times to DISK;Specification does not match any archived log in the repository Deleting Archivelog Backup : Crossscheck archivelog in physical level and database level,if matches it shows as succeeded RMAN> crosscheck archivelog all; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=273 device type=DISK validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_23_1157471808.dbf RECID=44 STAMP=1157550830 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_24_1157471808.dbf RECID=46 STAMP=1157550894 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_25_1157471808.dbf RECID=49 STAMP=1157550897 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_26_1157471808.dbf RECID=50 STAMP=1157550901 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_27_1157471808.dbf RECID=52 STAMP=1157550901 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_28_1157471808.dbf RECID=54 STAMP=1157550904 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_29_1157471808.dbf RECID=55 STAMP=1157550904 validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_30_1157471808.dbf RECID=58 STAMP=1157550908 Crosschecked 8 objectsDelete archivelog if its expired : RMAN> delete expired archivelog all; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=273 device type=DISK specification does not match any archived log in the repository Delete backup acrhivelog : RMAN> delete archivelog all backed up 1 times to DISK; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=273 device type=DISK RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_24_1157471808.dbf thread=1 sequence=24 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_25_1157471808.dbf thread=1 sequence=25 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_26_1157471808.dbf thread=1 sequence=26 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_27_1157471808.dbf thread=1 sequence=27 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_28_1157471808.dbf thread=1 sequence=28 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_29_1157471808.dbf thread=1 sequence=29 RMAN-08138: warning: archived log not deleted - must create more backups archived log file name=/u01/app/oracle/oradata/1_30_1157471808.dbf thread=1 sequence=30 List of Archived Log Copies for database with db_unique_name PRIM ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - --------- 44 1 23 A 06-JAN-24 Name: /u01/app/oracle/oradata/1_23_1157471808.dbf Do you really want to delete the above objects (enter YES or NO)? yes deleted archived log archived log file name=/u01/app/oracle/oradata/1_23_1157471808.dbf RECID=44 STAMP=1157550830 Deleted 1 objects We can check particular sequence of archivelog also RMAN> crosscheck archivelog sequence 24; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=273 device type=DISK validation succeeded for archived log archived log file name=/u01/app/oracle/oradata/1_24_1157471808.dbf RECID=46 STAMP=1157550894 Crosschecked 1 objects We can check particular sequence of backup archivelog also RMAN> crosscheck backup of archivelog sequence 24; using channel ORA_DISK_1 specification does not match any backup in the repository « Previous Next Topic » (RMAN Backup - Using Recovery Catalog) |