rman SBT_TAPE NFS disk 模拟NBU带库 FRA
-----------------rman 将本地磁盘变成磁带-----------------------------------
##RAC 本地 /nfs----两个备份策略 cluster=n
run {
allocate channel ch00 device type 'SBT_TAPE'
PARMS="SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/nfs)";
backup recovery area ; }
run {
allocate channel ch00 device type 'SBT_TAPE'
PARMS="SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/nfs)";
restore datafile 3 ; }
run {
allocate channel ch00 device type 'SBT_TAPE'
PARMS="SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/nfs)";
delete obsolete device type sbt;
}
run {
allocate channel ch00 device type 'SBT_TAPE'
PARMS="SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/nfs)";
restore database;
recover database;
}
------------------------磁盘磁带两个策略
To maintain two disctinct retention policies for disk and tape backups.
Decide which device needs the longest recovery window - typically this will be TAPE.
Configure the default retention policy to your longest recovery window egt 60 days.
RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;
This ensures that if 'delete obsolete' is run without any further specification, your highest retention policy is always observed.
The daily housekeeping routine will then delete obsolete tape backups using the default, and delete obsolete disk backups using an explicit recovery window overriding the default.
For example, if tapes are to be kept 28 days but disk backups are kept for just 7 days:
RMAN>DELETE OBSOLETE DEVICE TYPE TAPE;
RMAN>DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS DEVICE TYPE DISK ;
RMAN> backup archivelog all delete input;
all, or until time 'sysdate -7'
RMAN> run {
backup archivelog all;
delete archivelog until time 'sysdate -1' like '/u01/archives/TEST/%';
delete archivelog until time 'sysdate -5' like '/u02/archives/TEST/%';
}
RMAN> run {
allocate channel c1 type 'sbt_tape';
set archivelog destination to '+FRA/TEST/ARCHIVELOG/2010_08_13';
restore archivelog
from time "to_date('13/08/2010-00:00:00','dd/mm/yyyy-hh24:mi:ss')"
until time "to_date('14/08/2010-00:00:00','dd/mm/yyyy-hh24:mi:ss')";
}
SQL>Select file_type, percent_space_used as used,percent_space_reclaimable as reclaimable,
number_of_files as "number" from v$recovery_area_usage;
SQL> select name, space_limit as Total_size ,space_used as Used,
SPACE_RECLAIMABLE as reclaimable ,NUMBER_OF_FILES as "number"
from V$RECOVERY_FILE_DEST;
CROSSCHECK FOREIGN ARCHIVELOG ALL;
DELETE EXPIRED FOREIGN ARCHIVELOG ALL;
backup as compressed backupset database plus archivelog ;
Delete obsolete device type disk;
crosscheck archivelog all
You have a number of choices on how to resolve a full Fast Recovery Area when no files are eligible for deletion:
1. Make more disk space available and increase DB_RECOVERY_FILE_DEST_SIZE
SQL> alter system set db_recovery_file_dest_size=xG SCOPE=BOTH; -- (larger amount)
2. Move backups from the fast recovery area to tertiary storage such as tape.
RMAN>BACKUP RECOVERY AREA;
Note : Flashback logs cannot be backed up outside the recovery area and so are not backed up by BACKUP RECOVERY AREA.
3. Run DELETE for any files that have been removed with an operating system utility. If you use host operating system commands to delete files, then the database will not be aware of the resulting free space.
RMAN>CROSSCHECK BACKUP;
RMAN>CROSSCHECK ARCHIVELOG ALL;
RMAN>Delete expired backup;
RMAN>Delete expired archivelog all;
RMAN>Delete force obsolete;
4. Make sure that your guaranteed restore points are necessary. If not, delete them
SQL>Drop restore point <restore_point_name>;
5. If flashback logs are enable then make sure you have enough space for all the flashback logs. If its not required then you can turn off flashback.
SQL>Alter database FLASHBACK OFF;
6. Review your backup retention policy and if required change the RMAN RETENTION POLICY
RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
Exceptions :
- If RMAN is not part of backup strategy and archivelogs are going to FRA then manual intervention required for deletion of archivelogs. Periodically purse old archivelogs
for example
RMAN>Delete archivelog all completed before 'SYSDATE-7';
- By default RMAN backup goes to FRA. While taking RMAN backup if backup location explicitly specified to fast recovery area location then those backup pieces are not considered as part of FRA for auto management.
- For Archivelogs backup to FRA use USE_DB_RECOVERY_FILE_DEST rather than giving explicit path of FRA
SQL> alter system set log_archive_dest_10='LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=both;
------------------------archive log 备份
RMAN> backup as compressed backupset archivelog all;
Starting backup at 02-DEC-23
current log archived
Finished Control File and SPFILE Autobackup at 02-DEC-23
RMAN> delete noprompt force archivelog all backed up 1 times to device type sbt;
没有可以删除的,因为只是备份到了disk
RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> backup recovery area ; }
released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: SID=813 instance=cdb2 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API
Starting backup at 02-DEC-23
specification does not match any datafile copy in the repository
skipping backup set key 82; already backed up 1 time(s)
channel ch00: starting archived log backup set
channel ch00: specifying archived log(s) in backup set
input archived log thread=2 sequence=39 RECID=407 STAMP=1154562772
input archived log thread=2 sequence=40 RECID=408 STAMP=1154562774
input archived log thread=2 sequence=41 RECID=409 STAMP=1154562778
input archived log thread=2 sequence=42 RECID=410 STAMP=1154562781
input archived log thread=2 sequence=43 RECID=411 STAMP=1154562795
channel ch00: starting piece 1 at 02-DEC-23
channel ch00: finished piece 1 at 02-DEC-23
piece handle=5f2d2eoi_175_1_1 tag=TAG20231202T235354 comment=API Version 2.0,MMS Version 8.1.3.0
RMAN> delete noprompt force archivelog all backed up 1 times to device type sbt;
Deleted 5 objects
删除了archivelog 但是磁盘和SBT都有一个备份
RMAN> alter system switch logfile;
Statement processed
RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> backup recovery area ; }
released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: SID=813 instance=cdb2 device type=SBT_TAPE
channel ch00: WARNING: Oracle Test Disk API
Starting backup at 02-DEC-23
specification does not match any datafile copy in the repository
skipping backup set key 99; already backed up 1 time(s)
channel ch00: starting archived log backup set
channel ch00: specifying archived log(s) in backup set
input archived log thread=2 sequence=44 RECID=412 STAMP=1154562880
input archived log thread=2 sequence=45 RECID=413 STAMP=1154562882
input archived log thread=2 sequence=46 RECID=414 STAMP=1154562887
channel ch00: starting piece 1 at 02-DEC-23
channel ch00: finished piece 1 at 02-DEC-23
piece handle=5j2d2eqt_179_1_1 tag=TAG20231202T235509 comment=API Version 2.0,MMS Version 8.1.3.0
channel ch00: backup set complete, elapsed time: 00:00:01
Finished backup at 02-DEC-23
Starting Control File and SPFILE Autobackup at 02-DEC-23
piece handle=c-2265125454-20231202-22 comment=API Version 2.0,MMS Version 8.1.3.0
Finished Control File and SPFILE Autobackup at 02-DEC-23
released channel: ch00
RMAN> delete noprompt force archivelog all backed up 1 times to device type sbt;
Deleted 3 objects
只是备份FRA,Archivelog也是FRA一部分,SBT上有一个备份,DISK上没有备份,删了就没了
RMAN> delete noprompt force archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=813 instance=cdb2 device type=DISK
specification does not match any archived log in the repository
本地和FRA都没了,删不了。。。。。。。
RMAN> alter system switch logfile;
RMAN> run {
2> allocate channel ch00 device type 'SBT_TAPE'
3> PARMS="SBT_LIBRARY=oracle.disksbt,
4> ENV=(BACKUP_DIR=/nfs)";
5> backup recovery area ; }
RMAN> delete noprompt force archivelog all backed up 1 times to device type disk;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=813 instance=cdb2 device type=DISK
-----disk 确实没有备份,删除策略不生效
RMAN> backup recovery area; --------------backup fra 到disk 不行
RMAN> backup recovery area device type disk;
Starting backup at 02-DEC-23
using channel ORA_DISK_1
specification does not match any datafile copy in the repository
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/02/2023 23:56:56
RMAN-06603: TO DESTINATION option must be specified with RECOVERY AREA, RECOVERY FILES or DB_RECOVERY_FILE_DEST on disk device
RMAN-01007: at line 1 column 22 file: standard input
RMAN> delete noprompt force archivelog all backed up 1 times to device type disk;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=813 instance=cdb2 device type=DISK
---备份到本地可以删除也可以本地恢复
RMAN> backup archivelog all;
Finished Control File and SPFILE Autobackup at 02-DEC-23
RMAN> delete noprompt force archivelog all backed up 1 times to device type disk;
Deleted 5 objects
RMAN> restore archivelog from sequence 47 thread 2;
Starting restore at 02-DEC-23
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=47
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=48
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=49
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=50
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=51
channel ORA_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2023_12_02/annnf0_tag20231202t235747_0.318.1154516267
channel ORA_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2023_12_02/annnf0_tag20231202t235747_0.318.1154516267 tag=TAG20231202T235747
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-DEC-23
RMAN>
相关文章:

rman SBT_TAPE NFS disk 模拟NBU带库 FRA
-----------------rman 将本地磁盘变成磁带----------------------------------- ##RAC 本地 /nfs----两个备份策略 clustern run { allocate channel ch00 device type SBT_TAPE PARMS"SBT_LIBRARYoracle.disksbt, ENV(BACKUP_DIR/nfs)"; backup recove…...

物理世界中的等距3D对抗样本
论文题目:Isometric 3D Adversarial Examples in the Physical World 会议:NIPS 2022 点云: 点云——表达目标空间分布和目标表面特性的海量点集合,点包含xyz坐标信息 能够包含颜色等其他信息 使用顶点、边和面的数据表征的三维…...

解决vue3项目打包发布到服务器后访问页面显示空白问题
1.在 vite.config.ts 文件中 加入 base:./ 当你将 base 设置为 / 时,它表示你的应用程序将部署在服务器的根路径上,(将 base 设置为 / 表示你的应用程序部署在服务器的根路径上,并且 Vite 会相应地处理资源和路由的路径…...

什么是SMTP服务器?如何配置?
SMTP服务器是一种专门用于发送电子邮件的互联网服务器。SMTP(Simple Mail Transfer Protocol,简单邮件传输协议)是一种用于电子邮件传输的标准互联网协议。这些服务器充当电子邮件的“邮递员”,负责将发出的邮件从发送者传输到接收…...

el-tabel实现拖拽排序
1、使用npm安装sortableJs插件 npm install sortablejs --save2、在需要使用的页面进行引入 import Sortable from sortablejs3、表格拖拽排序完整代码 <template><div class"home"><el-table :data"tableData" style"width: 100%&…...

设计模式-结构型模式之适配器设计模式
文章目录 一、结构型设计模式二、适配器模式 一、结构型设计模式 这篇文章我们来讲解下结构型设计模式,结构型设计模式,主要处理类或对象的组合关系,为如何设计类以形成更大的结构提供指南。 结构型设计模式包括:适配器模式&…...

Android 中的权限
关于作者:CSDN内容合伙人、技术专家, 从零开始做日活千万级APP。 专注于分享各领域原创系列文章 ,擅长java后端、移动开发、商业变现、人工智能等,希望大家多多支持。 目录 一、导读二、概览三、权限分类3.1 安装时权限3.2 运行时…...

【java智慧工地源码】智慧工地物联网云平台,实现现场各类工况数据采集、存储、分析与应用
“智慧工地整体方案”以智慧工地物联网云平台为核心,基于智慧工地物联网云平台与现场多个子系统的互联,实现现场各类工况数据采集、存储、分析与应用。通过接入智慧工地物联网云平台的多个子系统板块,根据现场管理实际需求灵活组合࿰…...

oracle 19c rac 安装手册
oracle 19c rac 安装手册 官方文档:https://docs.oracle.com/en/database/oracle/oracle-database/19/index.html 一、集群规划 再部署集群之前,需要对网络和存储两个方面进行规划。下面简述了网络和存储两个方面需要注意的地方。 Oracle RAC 数据库私有网络通信必须使用单…...

sqlMap
url:https://sqlmap.org/ git:https://github.com/sqlmapproject/sqlmap.git git中文:https://github.com/sqlmapproject/sqlmap/blob/master/doc/translations/README-zh-CN.md use url:https://github.com/sqlmapproject/sqlmap…...

蓝桥杯每日一题2023.12.2
题目描述 蓝桥杯大赛历届真题 - C 语言 B 组 - 蓝桥云课 (lanqiao.cn) 题目分析 答案:3598180 由题目分析可以知道,给小明发的牌一共有13种类型,每种类型的牌一共有四张。对于每种牌,我们都有5种选择,不拿、拿一张、…...

【计算机网络学习之路】序列化,反序列化和初识协议
文章目录 前言一. 序列化和反序列化1.自己实现2. JSON 二. 初识协议结束语 前言 本系列文章是计算机网络学习的笔记,欢迎大佬们阅读,纠错,分享相关知识。希望可以与你共同进步。 本篇博文正式开始应用层的学习,首先讲解应用层的…...

亚马逊云科技推出新一代自研芯片
北京——2023 年12月1日 亚马逊云科技在2023 re:Invent全球大会上宣布其自研芯片家族的两个系列推出新一代,包括Amazon Graviton4和Amazon Trainium2,为机器学习(ML)训练和生成式人工智能(AI)应用等广泛的工…...

VIT总结
关于transformer、VIT和Swin T的总结 1.transformer 1.1.注意力机制 An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a wei…...

C++11——initializer_list
initializer_list的简介 initializer_list是C11新出的一个类型,正如类型的简介所说,initializer_list一般用于作为构造函数的参数,来让我们更方便赋值 但是光看这些,我们还是不知道initializer_list到底是个什么类型,…...
数学字体 Mathematical fonts
Mathematical fonts 数学字体: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzRQSZ \\ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzRQSZ} \\ \mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzRQSZ} \\ \mathbb{ABC…...

Python简单模拟蓝牙车钥匙协议
本文设计一个简单的蓝牙车钥匙协议,协议包含DH密钥协商和基于RSA的身份认证功能,以及防重放与消息完整性验证。 1. 密钥协商过程: - 设定 DH 参数:素数 p 和生成元 g。 - 发送方(Alice)生成 DH 的私钥 a 并计算公钥 A…...

【Python3】【力扣题】383. 赎金信
【力扣题】题目描述: 题解: 两个字符串ransomNote和magazine,ransomNote中每个字母都在magazine中一一对应(顺序可以不同)。 即分别统计两个字符串中每个字母出现的次数,ransomNote中每个字母的个数小于等…...

外包搞了6年,技术退步明显......
先说情况,大专毕业,18年通过校招进入湖南某软件公司,干了接近6年的功能测试,今年年初,感觉自己不能够在这样下去了,长时间呆在一个舒适的环境会让一个人堕落!而我已经在一个企业干了四年的功能测试…...

uni-app x生成的安卓包,安装时,提示不兼容。解决方案
找到 manifest.json 进入:源码视图 代码 {"name" : "xxx康养","appid" : "__xxx6","description" : "xxx康养","versionName" : "1.0.12","versionCode" : 100012,&…...

Screenshot To Code
序言 对于GPT-4我只是一个门外汉,至于我为什么要了解screenshot to code,只是因为我想知道,在我不懂前端设计的情况下,能不能通过一些工具辅助自己做一些简单的前端界面设计。如果你想通过此文深刻了解GPT-4或者该开源项目&#…...

SpringBoot 是如何启动一个内置的Tomcat
为什么说Spring Boot框架内置Tomcat 容器,Spring Boot框架又是怎么样去启动Tomcat的?我简单总结下学习过程。 一:简单了解SpringBoot的启动类 我们都知道Spring Boot框架的启动类上是需要使用 @SpringBootApplication 注解标注的, @SpringBootApplication 是一个复合注解…...

《功能磁共振多变量模式分析中空间分辨率对解码精度的影响》论文阅读
《The effect of spatial resolution on decoding accuracy in fMRI multivariate pattern analysis》 文章目录 一、简介论文的基本信息摘要 二、论文主要内容语音刺激的解码任务多变量模式分析(MVPA)K空间 空间分辨率和平滑对MVPA的影响平滑的具体过程…...

pygame实现贪吃蛇小游戏
import pygame import random# 游戏初始化 pygame.init()# 游戏窗口设置 win_width, win_height 800, 600 window pygame.display.set_mode((win_width, win_height)) pygame.display.set_caption("Snake Game")# 颜色设置 WHITE (255, 255, 255) BLACK (0, 0, 0…...

反序列化漏洞(二)
目录 pop链前置知识,魔术方法触发规则 pop构造链解释(开始烧脑了) 字符串逃逸基础 字符减少 字符串逃逸基础 字符增加 实例获取flag 字符串增多逃逸 字符串减少逃逸 延续反序列化漏洞(一)的内容 pop链前置知识,魔术方法触…...

【开箱即用】前后端同时开源!周末和AI用Go语言共同研发了一款笔记留言小程序!
大家好,我是豆小匠。 真的是当你在怀疑AI会不会取代人类的时候,别人已经用AI工具加速几倍的生产速度了… 周末体验了和AI共同开发的感受,小项目真的可以一人全干了… 本次实验使用的AI工具有两个:1. GitHub Copilot(…...

java对xml压缩
import java.util.*; import java.util.zip.GZIPOutputStream; import java.nio.charset.StandardCharsets; import org.apache.commons.codec.binary.Base64;/*** 模板压缩** param xml 模板xml* return* throws Exception*/public static String businessData(String xml) th…...

GoLang切片
一、切片基础 1、切片的定义 切片(Slice)是一个拥有相同类型元素的可变长度的序列它是基于数组类型做的一层封装它非常灵活,支持自动扩容切片是一个引用类型,它的内部结构包含地址、长度和容量声明切片类型的基本语法如下&#…...

前端入门(四)Ajax、Promise异步、Axios通信、vue-router路由、组件库
文章目录 AjaxAjax特点 Promise 异步编程(缺)Promise基本使用状态 - PromiseState结果 - PromiseResult AxiosVue中使用AxiosAxios请求方式getpostput和patchdelete并发请求 Vue路由 - vue-router单页面Web应用(single page web application&…...

正则表达式回溯陷阱
一、匹配场景 判断一个句子是不是正规英文句子 text "I am a student" 一个正常的英文句子如上,英文单词 空格隔开 英文单词 多个英文字符 [a-zA-Z] 空格用 \s 表示 那么一个句子就是单词 空格(一个或者多个,最后那个单词…...