|
第二个catalog:
- select username from dba_users order by 1;
- select * from dba_tablespaces;
- select * from dba_data_files;
- create tablespace winrcat datafile 'C:\APP\BOTANG\ORADATA\WINORCL\WINRCAT01.DBF' size 20M autoextend on;
- create user winu76 identified by oracle_4U quota unlimited on winrcat;
- alter user winu76 default tablespace winrcat;
- grant recovery_catalog_owner to winu76;
复制代码 ---------------------
- RMAN> import catalog u76/oracle_4U@rcat dbid=1554722616
复制代码
------虚拟专用catalog:
1. 全新地创建基础catalog (winu76):
- RMAN> drop catalog;
- 恢复目录所有者是U76
- 再输入一次 DROP CATALOG 命令来确认目录删除
- RMAN> drop catalog;
- 恢复目录已删除
- RMAN> create catalog;
- 恢复目录已创建
- RMAN>
复制代码
2. 在winorcl上创建两个"小用户",并授权:
- create user vorcl identified by oracle_4U default tablespace winrcat quota unlimited on winrcat;
- create user vrcat identified by oracle_4U default tablespace winrcat quota unlimited on winrcat;
复制代码- grant recovery_Catalog_owner to vorcl;
- grant recovery_Catalog_owner to vrcat;
复制代码
3. 叫“小用户”去寻找“猎物”
- grant recovery_Catalog_owner to vorcl;
- grant recovery_Catalog_owner to vrcat;
复制代码
4. 创建虚拟catalog:
- grant recovery_Catalog_owner to vorcl;
- grant recovery_Catalog_owner to vrcat;
复制代码
-------
- 恢复管理器: Release 11.2.0.4.0 - Production on 星期六 12月 14 09:17:02 2019
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- 已连接到目标数据库: ORCL (DBID=1554722616)
- 连接到恢复目录数据库
- RMAN> register database;
- 注册在恢复目录中的数据库
- 正在启动恢复目录的全部重新同步
- 完成全部重新同步
- RMAN> exit
- 恢复管理器完成。
- C:\Users\botang>rman target sys/oracle_4U@orcl catalog winu76/oracle_4U@winor
- cl
- 恢复管理器: Release 11.2.0.4.0 - Production on 星期六 12月 14 09:17:36 2019
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- 已连接到目标数据库: ORCL (DBID=1554722616)
- 连接到恢复目录数据库
- RMAN> exit
- 恢复管理器完成。
- C:\Users\botang>rman target sys/oracle_4U@rcat catalog vrcat/oracle_4U@winorc
- l
复制代码- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- 已连接到目标数据库: RCAT (DBID=786112668)
- 连接到恢复目录数据库
- RMAN> register database;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: register 命令 (在 12/14/2019 09:19:21 上) 失败
- RMAN-06428: 未安装恢复目录
- RMAN> create virtual catalog;
- 找到 WINU76 所拥有的符合条件的基础目录
- 已针对 WINU76 所拥有的基础目录创建了虚拟目录
- RMAN> register database;
复制代码- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- 已连接到目标数据库: RCAT (DBID=786112668)
- 连接到恢复目录数据库
- RMAN> register database;
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: register 命令 (在 12/14/2019 09:19:21 上) 失败
- RMAN-06428: 未安装恢复目录
- RMAN> create virtual catalog;
- 找到 WINU76 所拥有的符合条件的基础目录
- 已针对 WINU76 所拥有的基础目录创建了虚拟目录
- RMAN> register database;
复制代码
----backup backupset force...用于转移备份集到磁带机:
-----如果反过来,要把磁带机里的东西转移到磁盘,就是镜像拷贝格式:
- RMAN> run {
- 2> set newname for datafile 4 to '/home/oracle/FROM_SBT/users.dbf';
- 3> restore datafile 4 from tag '3D_USERS_FULL';
- 4> }
- executing command: SET NEWNAME
- Starting restore at 2019-12-14:02:08:17
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=75 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=198 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=17 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=77 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=132 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=191 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=18 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=76 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=142 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=203 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_1: restoring datafile 00004 to /home/oracle/FROM_SBT/users.dbf
- channel ORA_SBT_TAPE_1: reading from backup piece 09ujc8d5_1_2
复制代码- RMAN> list copy of datafile 4;
- using target database control file instead of recovery catalog
- List of Datafile Copies
- =======================
- Key File S Completion Time Ckp SCN Ckp Time
- ------- ---- - ------------------- ---------- -------------------
- 1 4 A 2019-12-14:02:08:38 1000280 2019-12-14:02:02:13
- Name: /home/oracle/FROM_SBT/users.dbf
- RMAN>
复制代码 ------------------------------------------------------
--------------------------------------------------------
备份策略:
12.14:
- RMAN> CONFIGURE RETENTION POLICY TO recovery window of 1 days;
- new RMAN configuration parameters:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- new RMAN configuration parameters are successfully stored
- RMAN> backup tag '1T_WHOLE_FULL' database;
- Starting backup at 2019-12-14:02:15:57
- released channel: ORA_DISK_1
- released channel: ORA_DISK_2
- released channel: ORA_DISK_3
- released channel: ORA_DISK_4
- released channel: ORA_DISK_5
- released channel: ORA_DISK_6
- released channel: ORA_DISK_7
- released channel: ORA_DISK_8
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=203 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=76 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-14:02:15:59
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-14:02:15:59
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-14:02:16:24
- piece handle=0aujc96u_1_1 tag=1T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- including current control file in backup set
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-14:02:16:25
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-14:02:16:32
- piece handle=0bujc96v_1_1 tag=1T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:33
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-14:02:16:32
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-14:02:16:47
- piece handle=0cujc97o_1_1 tag=1T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:22
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-14:02:16:47
- piece handle=0dujc980_1_1 tag=1T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:15
- Finished backup at 2019-12-14:02:16:47
- RMAN>
复制代码
1T Finished backup at 2019-12-14:02:16:47
- [root@station76 stage]# date -s "Sat Dec 15 02:17:00 CST 2019"
- Sun Dec 15 02:17:00 CST 2019
复制代码
- [oracle@station76 FROM_SBT]$ rman target /
- Recovery Manager: Release 11.2.0.4.0 - Production on Sun Dec 15 02:20:00 2019
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1554722616)
- RMAN> backup tag '2T_WHOLE_FULL' database;
- Starting backup at 2019-12-15:02:20:18
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=80 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=200 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-15:02:20:21
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-15:02:20:21
复制代码
2T: Finished backup at 2019-12-15:02:21:32
没有什么东西过时:
- RMAN> report obsolete;
- RMAN retention policy will be applied to the command
- RMAN retention policy is set to recovery window of 1 days
- Report of obsolete backups and copies
- Type Key Completion Time Filename/Handle
- -------------------- ------ ------------------ --------------------
- Backup Set 13 2019-12-14:02:16:47
- Backup Piece 14 2019-12-14:02:16:47 0dujc980_1_1
- RMAN> list backupset 13; \
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ -------------------
- 13 Full 128.00K SBT_TAPE 00:00:15 2019-12-14:02:16:47
- BP Key: 14 Status: AVAILABLE Compressed: NO Tag: 1T_WHOLE_FULL
- Handle: 0dujc980_1_1 Media: station76-000046
- SPFILE Included: Modification time: 2019-12-13:21:44:55
- SPFILE db_unique_name: ORCL
复制代码
过一天(但是不够24H):
- [root@station76 stage]# date -s ""Sat Dec 15 23:59:00 CST 2019"
复制代码
过一天(够24H):
- RMAN> report obsolete;
- RMAN retention policy will be applied to the command
- RMAN retention policy is set to recovery window of 1 days
- Report of obsolete backups and copies
- Type Key Completion Time Filename/Handle
- -------------------- ------ ------------------ --------------------
- Backup Set 10 2019-12-14:02:16:22
- Backup Piece 11 2019-12-14:02:16:22 0aujc96u_1_1
- Backup Set 11 2019-12-14:02:16:29
- Backup Piece 12 2019-12-14:02:16:29 0bujc96v_1_1
- Backup Set 12 2019-12-14:02:16:40
- Backup Piece 13 2019-12-14:02:16:40 0cujc97o_1_1
- Backup Set 13 2019-12-14:02:16:47
- Backup Piece 14 2019-12-14:02:16:47 0dujc980_1_1
- RMAN> exit
复制代码- RMAN> report need backup;
- RMAN retention policy will be applied to the command
- RMAN retention policy is set to recovery window of 1 days
- Report of files that must be backed up to satisfy 1 days recovery window
- File Days Name
- ---- ----- -----------------------------------------------------
- RMAN>
复制代码
再过一天(但是不够24H):
- [root@station76 stage]# date -s "Sat Dec 16 23:59:00 CST 2019"
复制代码- RMAN> report need backup;
- RMAN retention policy will be applied to the command
- RMAN retention policy is set to recovery window of 1 days
- Report of files that must be backed up to satisfy 1 days recovery window
- File Days Name
- ---- ----- -----------------------------------------------------
- 1 2 +DATA/orcl/datafile/system.283.1026941797
- 2 2 +DATA/orcl/datafile/sysaux.282.1026941797
- 3 2 +DATA/orcl/datafile/undotbs1.281.1026941797
- 4 2 +DATA/orcl/datafile/users.265.1026941797
复制代码 ---备份优化:
12.17
- alter tablespace users read only;
复制代码- RMAN> CONFIGURE BACKUP OPTIMIZATION on;
- new RMAN configuration parameters:
- CONFIGURE BACKUP OPTIMIZATION ON;
- new RMAN configuration parameters are successfully stored
复制代码- RMAN> backup tag '3T_WHOLE_FULL' database;
- Starting backup at 2019-12-17:00:06:34
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=138 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=205 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-17:00:06:35
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-17:00:06:35
复制代码
3T: Finished backup at 2019-12-17:00:07:30
4T不会再备份users,(如果4T 加上force会包括users: backup tag '4T_WHOLE_FULL' database force)
- [root@station76 stage]# date -s "Tue Dec 17 23:50:00 CST 2019"
- Tue Dec 17 23:50:00 CST 2019
复制代码
- RMAN> backup tag '4T_WHOLE_FULL' database;
- Starting backup at 2019-12-17:23:50:23
- using target database control file instead of recovery catalog
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=19 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=138 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- skipping datafile 4; already backed up 1 time(s)
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-17:23:50:26
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-17:23:50:26
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-17:23:51:01
- piece handle=0mujmi62_1_1 tag=4T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- including current control file in backup set
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-17:23:51:02
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-17:23:51:05
- piece handle=0nujmi62_1_1 tag=4T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:39
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-17:23:51:05
- channel ORA_SBT_TAPE_2: finished piece 1 at 2019-12-17:23:51:20
- piece handle=0pujmi79_1_1 tag=4T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:15
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-17:23:51:30
- piece handle=0oujmi75_1_1 tag=4T_WHOLE_FULL comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:28
- Finished backup at 2019-12-17:23:51:30
- RMAN>
复制代码 但是再过一天(但是不够24H):5T、6T等等 会重新备份users
- [root@station76 stage]# date -s "Tue Dec 17 23:59:00 CST 2019"
- Tue Dec 17 23:59:00 CST 2019
复制代码- RMAN> backup tag '6T_WHOLE_FULL' database;
- Starting backup at 2019-12-18:00:01:10
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:00:01:10
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:00:01:10
复制代码
加上exclude ,可以人为不不备份
- RMAN> configure exclude for tablespace users;
- Tablespace USERS will be excluded from future whole database backups
- new RMAN configuration parameters are successfully stored
- RMAN> show exclude;
- RMAN configuration parameters for database with db_unique_name ORCL are:
- CONFIGURE EXCLUDE FOR TABLESPACE 'USERS';
- RMAN> show all;
- RMAN configuration parameters for database with db_unique_name ORCL are:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
- CONFIGURE BACKUP OPTIMIZATION ON;
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station76)';
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=station76)';
- 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 EXCLUDE FOR TABLESPACE 'USERS';
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default
- RMAN> backup tag '7T_WHOLE_FULL' database;
- Starting backup at 2019-12-18:00:04:27
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- file 4 is excluded from whole database backup
- channel ORA_SBT_TAPE_1: starting full datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:00:04:28
- channel ORA_SBT_TAPE_2: starting full datafile backup set
- channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
- channel ORA_SBT_TAPE_2: starting piece 1 at 2019-12-18:00:04:28
复制代码
增量备份记录段数:
- RMAN> backup tag '10T_USERS_INCR1' incremental level 1 tablespace users;
- Starting backup at 2019-12-18:00:40:09
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:00:40:09
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:00:40:24
- piece handle=18ujml39_1_1 tag=10T_USERS_INCR1 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
- Finished backup at 2019-12-18:00:40:24
- RMAN> report need backup incremental 0;
- Report of files that need more than 0 incrementals during recovery
- File Incrementals Name
- ---- ------------ ----------------------------------------------
- 4 1 +DATA/orcl/datafile/users.265.1026941797
- RMAN> report need backup incremental 1;
- Report of files that need more than 1 incrementals during recovery
- File Incrementals Name
- ---- ------------ ----------------------------------------------
- RMAN> backup tag '11T_USERS_INCR1' incremental level 1 tablespace users;
- Starting backup at 2019-12-18:00:41:02
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:00:41:02
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:00:41:17
- piece handle=19ujml4u_1_1 tag=11T_USERS_INCR1 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:15
- Finished backup at 2019-12-18:00:41:17
- RMAN> report need backup incremental 1;
- Report of files that need more than 1 incrementals during recovery
- File Incrementals Name
- ---- ------------ ----------------------------------------------
- 4 2 +DATA/orcl/datafile/users.265.1026941797
- RMAN> backup tag '12T_USERS_INCR1' incremental level 1 cumulative tablespace users;
- Starting backup at 2019-12-18:00:41:54
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- channel ORA_SBT_TAPE_1: starting piece 1 at 2019-12-18:00:41:54
- channel ORA_SBT_TAPE_1: finished piece 1 at 2019-12-18:00:42:19
- piece handle=1aujml6i_1_1 tag=12T_USERS_INCR1 comment=API Version 2.0,MMS Version 10.4.0.4
- channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
- Finished backup at 2019-12-18:00:42:19
- RMAN> report need backup incremental 1;
- Report of files that need more than 1 incrementals during recovery
- File Incrementals Name
- ---- ------------ ----------------------------------------------
- RMAN> report need backup incremental 0;
- Report of files that need more than 0 incrementals during recovery
- File Incrementals Name
- ---- ------------ ----------------------------------------------
- 4 1 +DATA/orcl/datafile/users.265.1026941797
- RMAN>
复制代码
---------
磁带机份数备份,要开异步IO:
- RMAN> backup tag '13T_USERS_INCR1' incremental level 1 copies 2 tablespace users;
- Starting backup at 2019-12-18:00:45:30
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
- channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1026941797
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of backup command on ORA_SBT_TAPE_1 channel at 12/18/2019 00:45:30
- ORA-19565: BACKUP_TAPE_IO_SLAVES not enabled when duplexing to sequential devices
复制代码
--------
- ob> lsvol -L lib01 -l
- Inventory of library lib01:
- in 1: volume station76-000045, barcode E01001L4, oid 324, full, content manages reuse
- in 2: volume station76-000046, barcode E01002L4, oid 325, full, content manages reuse
- in 3: volume station76-000047, barcode E01003L4, oid 326, full, content manages reuse
- in 4: volume station76-000048, barcode E01004L4, oid 327, 110592 kb remaining, content manages reuse
- in 5: volume station76-000049, barcode E01005L4, oid 328, full, content manages reuse
- in 6: volume station76-000050, barcode E01006L4, oid 329, 338944 kb remaining, content manages reuse
- in 7: vacant
- in 8: vacant
- in 9: barcode E01009L4, oid 315, 510976 kb remaining
- in 10: barcode E01010L4, oid 317, 510976 kb remaining
- in 11: barcode E01011L4, oid 110
- in 12: barcode E01012L4, oid 111
- in 13: barcode E01013L4, oid 112
- in 14: barcode E01014L4, oid 113
- in 15: barcode E01015L4, oid 114
- in 16: barcode E01016L4, oid 115
- in 17: barcode E01017L4, oid 116
- in 18: barcode E01018L4, oid 117
- in 19: barcode E01019L4, oid 118
- in 20: barcode E01020L4, oid 119
- in 21: vacant
- in 22: barcode CLN101L4, oid 120
- in 23: barcode CLN102L5, oid 121
- in 24: vacant
- in 25: vacant
- in 26: vacant
- in 27: vacant
- in 28: vacant
- in 29: vacant
- in 30: barcode F01030L5, oid 122
- in 31: barcode F01031L5, oid 123
- in 32: barcode F01032L5, oid 124
- in 33: barcode F01033L5, oid 125
- in 34: barcode F01034L5, oid 126
- in 35: barcode F01035L5, oid 127
- in 36: barcode F01036L5, oid 128
- in 37: barcode F01037L5, oid 129
- in 38: barcode F01038L5, oid 130
- in 39: barcode F01039L5, oid 131
- in iee1: vacant
- in iee2: vacant
- in iee3: vacant
- in iee4: vacant
- in dte1: vacant
- in dte2: vacant
- in dte3: volume RMAN-DEFAULT-000013, barcode E01007L4, oid 330, content manages reuse, lastse 7
- in dte4: volume RMAN-DEFAULT-000014, barcode E01008L4, oid 331, content manages reuse, lastse 8
- ob>
复制代码
|
|