• RMAN 管理


    • 查看RMAN所有配置信息
    [oracle@rac1 ~]$ rman target /
    
    Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 27 11:51:59 2013
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: RACDB (DBID=816037396)
    
    RMAN> show all
    2> ;
    
    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name RACDB 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 ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/oracle/db/dbs/snapcf_racdb1.f'; # default
    View Code

    在RMAN里面,做0级增量备份,是相当于做全备的.但是全备是不能作为增量备份的基础的.

    • 某案例备份策略参考:
      • 1、每周礼拜三、礼拜天的凌晨1点做0级增量备份.
      • 2、每周礼拜一、礼拜二、礼拜四、礼拜五、礼拜六做1级的差异增量备份.
    • 修改RMAN备份保留策略案例 
    RMAN> show all;
    
    RMAN configuration parameters for database with db_unique_name RACDB 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 ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/oracle/db/dbs/snapcf_racdb1.f'; # default
    
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY  WINDOW OF 30DAYS;
    
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
    new RMAN configuration parameters are successfully stored
    
    RMAN> show all;
    
    RMAN configuration parameters for database with db_unique_name RACDB are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
    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 ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/oracle/db/dbs/snapcf_racdb1.f'; # default
    View Code
    • 查看数据库是否打开块变化跟踪
    SQL> select * from v$block_change_tracking;
    
    STATUS     FILENAME                            BYTES
    ---------- ------------------------------ ----------
    DISABLED
    View Code

    备注:打开块变化跟踪,当块信息发生变化的时候,RMAN就可以根据块的变化信息,来定位跟踪发生变化的内容,从而高效的进行备份.

    备份策略 

  • 相关阅读:
    JAVA高级篇(二、JVM内存模型、内存管理之第二篇)
    JAVA高级篇(三、JVM编译机制、类加载机制)
    spring batch (二) 元数据表
    spring batch (一) 常见的基本的概念介绍
    ORACLE——EXTRACT() 截取日期时间的函数使用
    ORACLE——NVL()、NVL2() 函数的用法
    ORACLE删除分区
    ORACLE中关于使用between在MyBatis中取不同的区间值和取反
    ORACLE——count() 统计函数的使用
    Oracle——trunc()函数的使用
  • 原文地址:https://www.cnblogs.com/arcer/p/3158501.html
Copyright © 2020-2023  润新知