backup archivelog all not backed up;

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介: backup archivelog all not backed up;这条命令可以用来备份没有备份过的归档日志,同时不会备份已经备份过的归档日志。下面是具体用法。 第一次备份归档日志 点击(此处)折叠或打开 ...
backup archivelog all not backed up;
这条命令可以用来备份没有备份过的归档日志,同时不会备份已经备份过的归档日志。下面是具体用法。

第一次备份归档日志

点击(此处)折叠或打开

  1. RMAN> backup archivelog all not backed up;

  2. Starting backup at 12-MAR-16
  3. current log archived
  4. using channel ORA_DISK_1
  5. channel ORA_DISK_1: starting archived log backup set
  6. channel ORA_DISK_1: specifying archived log(s) in backup set
  7. input archived log thread=1 sequence=5 RECID=1 STAMP=906200876
  8. input archived log thread=1 sequence=6 RECID=2 STAMP=906275330
  9. input archived log thread=1 sequence=7 RECID=3 STAMP=906275462
  10. input archived log thread=1 sequence=8 RECID=4 STAMP=906275486
  11. input archived log thread=1 sequence=9 RECID=5 STAMP=906275493
  12. input archived log thread=1 sequence=10 RECID=6 STAMP=906275503
  13. input archived log thread=1 sequence=11 RECID=7 STAMP=906275511
  14. input archived log thread=1 sequence=12 RECID=8 STAMP=906275530
  15. input archived log thread=1 sequence=13 RECID=9 STAMP=906275556
  16. input archived log thread=1 sequence=14 RECID=10 STAMP=906275574
  17. input archived log thread=1 sequence=15 RECID=11 STAMP=906275592
  18. input archived log thread=1 sequence=16 RECID=12 STAMP=906275612
  19. input archived log thread=1 sequence=17 RECID=13 STAMP=906275634
  20. input archived log thread=1 sequence=18 RECID=14 STAMP=906275673
  21. input archived log thread=1 sequence=19 RECID=15 STAMP=906275691
  22. input archived log thread=1 sequence=20 RECID=16 STAMP=906275730
  23. input archived log thread=1 sequence=21 RECID=17 STAMP=906275892
  24. input archived log thread=1 sequence=22 RECID=18 STAMP=906285113
  25. input archived log thread=1 sequence=23 RECID=19 STAMP=906285372
  26. input archived log thread=1 sequence=24 RECID=20 STAMP=906287723
  27. input archived log thread=1 sequence=25 RECID=21 STAMP=906289627
  28. input archived log thread=1 sequence=26 RECID=22 STAMP=906291279
  29. input archived log thread=1 sequence=27 RECID=23 STAMP=906291412
  30. input archived log thread=1 sequence=28 RECID=24 STAMP=906291557
  31. input archived log thread=1 sequence=29 RECID=25 STAMP=906291740
  32. input archived log thread=1 sequence=30 RECID=26 STAMP=906292245
  33. channel ORA_DISK_1: starting piece 1 at 12-MAR-16
  34. channel ORA_DISK_1: finished piece 1 at 12-MAR-16
  35. piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_03_12/o1_mf_annnn_TAG20160312T115045_cg74jop2_.bkp tag=TAG20160312T115045 comment=NONE
  36. channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
  37. Finished backup at 12-MAR-16

第二次备份归档日志

点击(此处)折叠或打开

  1. RMAN> backup archivelog all not backed up;

  2. Starting backup at 12-MAR-16
  3. current log archived
  4. using channel ORA_DISK_1
  5. skipping archived logs of thread 1 from sequence 5 to 30; already backed up
  6. channel ORA_DISK_1: starting archived log backup set
  7. channel ORA_DISK_1: specifying archived log(s) in backup set
  8. input archived log thread=1 sequence=31 RECID=27 STAMP=906292476
  9. channel ORA_DISK_1: starting piece 1 at 12-MAR-16
  10. channel ORA_DISK_1: finished piece 1 at 12-MAR-16
  11. piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_03_12/o1_mf_annnn_TAG20160312T115436_cg74qwtq_.bkp tag=TAG20160312T115436 comment=NONE
  12. channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
  13. Finished backup at 12-MAR-16
可以看到,除了新产生的31号归档,前面的归档日志均已跳过备份。

将命令稍微修改一下

点击(此处)折叠或打开

  1. RMAN> backup archivelog all not backed up 2 times;

  2. Starting backup at 12-MAR-16
  3. current log archived
  4. using channel ORA_DISK_1
  5. channel ORA_DISK_1: starting archived log backup set
  6. channel ORA_DISK_1: specifying archived log(s) in backup set
  7. input archived log thread=1 sequence=5 RECID=1 STAMP=906200876
  8. input archived log thread=1 sequence=6 RECID=2 STAMP=906275330
  9. input archived log thread=1 sequence=7 RECID=3 STAMP=906275462
  10. input archived log thread=1 sequence=8 RECID=4 STAMP=906275486
  11. input archived log thread=1 sequence=9 RECID=5 STAMP=906275493
  12. input archived log thread=1 sequence=10 RECID=6 STAMP=906275503
  13. input archived log thread=1 sequence=11 RECID=7 STAMP=906275511
  14. input archived log thread=1 sequence=12 RECID=8 STAMP=906275530
  15. input archived log thread=1 sequence=13 RECID=9 STAMP=906275556
  16. input archived log thread=1 sequence=14 RECID=10 STAMP=906275574
  17. input archived log thread=1 sequence=15 RECID=11 STAMP=906275592
  18. input archived log thread=1 sequence=16 RECID=12 STAMP=906275612
  19. input archived log thread=1 sequence=17 RECID=13 STAMP=906275634
  20. input archived log thread=1 sequence=18 RECID=14 STAMP=906275673
  21. input archived log thread=1 sequence=19 RECID=15 STAMP=906275691
  22. input archived log thread=1 sequence=20 RECID=16 STAMP=906275730
  23. input archived log thread=1 sequence=21 RECID=17 STAMP=906275892
  24. input archived log thread=1 sequence=22 RECID=18 STAMP=906285113
  25. input archived log thread=1 sequence=23 RECID=19 STAMP=906285372
  26. input archived log thread=1 sequence=24 RECID=20 STAMP=906287723
  27. input archived log thread=1 sequence=25 RECID=21 STAMP=906289627
  28. input archived log thread=1 sequence=26 RECID=22 STAMP=906291279
  29. input archived log thread=1 sequence=27 RECID=23 STAMP=906291412
  30. input archived log thread=1 sequence=28 RECID=24 STAMP=906291557
  31. input archived log thread=1 sequence=29 RECID=25 STAMP=906291740
  32. input archived log thread=1 sequence=30 RECID=26 STAMP=906292245
  33. input archived log thread=1 sequence=31 RECID=27 STAMP=906292476
  34. input archived log thread=1 sequence=32 RECID=28 STAMP=906292679
  35. channel ORA_DISK_1: starting piece 1 at 12-MAR-16
  36. channel ORA_DISK_1: finished piece 1 at 12-MAR-16
  37. piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_03_12/o1_mf_annnn_TAG20160312T115759_cg74y7vy_.bkp tag=TAG20160312T115759 comment=NONE
  38. channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
  39. Finished backup at 12-MAR-16
该命令的意思是:备份 没有备份过两次的归档日志,前面的所有归档日志只备份过一次,所以都备份。

再看下面的命令

点击(此处)折叠或打开

  1. RMAN> backup archivelog all not backed up 1 times;

  2. Starting backup at 12-MAR-16
  3. current log archived
  4. using channel ORA_DISK_1
  5. skipping archived logs of thread 1 from sequence 5 to 32; already backed up
  6. channel ORA_DISK_1: starting archived log backup set
  7. channel ORA_DISK_1: specifying archived log(s) in backup set
  8. input archived log thread=1 sequence=33 RECID=29 STAMP=906292883
  9. channel ORA_DISK_1: starting piece 1 at 12-MAR-16
  10. channel ORA_DISK_1: finished piece 1 at 12-MAR-16
  11. piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_03_12/o1_mf_annnn_TAG20160312T120123_cg754mrr_.bkp tag=TAG20160312T120123 comment=NONE
  12. channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
  13. Finished backup at 12-MAR-16
1 times与不加1 times的效果是一样的,即备份过一次及以上的归档都不归档,在此处,新产生的33号归档 日志没有备份过,因此备份33号归档日志。

@760
相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
7月前
19c restore standby controlfile from servic
restore standby controlfile from servic
51 0
两次 backup archivelog like
试试在12.1~19c的RAC连续运行两次 backup archivelog like ‘+%’ not backed up 1 times
|
关系型数据库 MySQL 数据库
|
关系型数据库 MySQL 数据库
|
关系型数据库 MySQL 数据库
|
Oracle 关系型数据库 测试技术
[20171122]rman backup as copy的备份问题
[20171122]rman backup as copy的备份问题.txt --//以前曾经写过一篇[20160524]rman备份与检查点4.txt=>链接:http://blog.
1140 0
|
SQL Oracle 关系型数据库
[20160720]rman set newname for datafile
[20160720]rman set newname for datafile本质.txt --前几天在恢复历史数据库,因为生产系统数据库是asm,恢复必须要转成文件类型。
1523 0