博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
数据库备份恢复--备份数据库
阅读量:5348 次
发布时间:2019-06-15

本文共 3973 字,大约阅读时间需要 13 分钟。

 

备份数据库注意事项:

1.备份的位置

2.是否使用FRA

3.备份位置的权限和空间

 

 

数据库备份

 

1.备份整个数据库 

RMAN> backup database plus archivelog delete input;

Starting backup at 07-SEP-18 --备份日期
current log archived         --归档?
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=931 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=123 RECID=117 STAMP=986199636
channel ORA_DISK_1: starting piece 1 at 07-SEP-18
channel ORA_DISK_1: finished piece 1 at 07-SEP-18
piece handle=/u01/FRA/OCP/backupset/2018_09_07/o1_mf_annnn_TAG20180907T082036_fs4v8o8c_.bkp tag=TAG20180907T082036 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/FRA/OCP/archivelog/2018_09_07/o1_mf_1_123_fs4v8nfh_.arc RECID=117 STAMP=986199636
Finished backup at 07-SEP-18

Starting backup at 07-SEP-18

using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/OCP/datafile/o1_mf_system_fb8w44fm_.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/OCP/datafile/o1_mf_undotbs1_fb8w44gd_.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/OCP/datafile/o1_mf_users_fb8w44gz_.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/OCP/datafile/o1_mf_sysaux_fb8w44g7_.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/OCP/datafile/o1_mf_example_fb8w6fnx_.dbf
channel ORA_DISK_1: starting piece 1 at 07-SEP-18
channel ORA_DISK_1: finished piece 1 at 07-SEP-18
piece handle=/u01/FRA/OCP/backupset/2018_09_07/o1_mf_nnndf_TAG20180907T082038_fs4v8q06_.bkp tag=TAG20180907T082038 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 07-SEP-18
channel ORA_DISK_1: finished piece 1 at 07-SEP-18
piece handle=/u01/FRA/OCP/backupset/2018_09_07/o1_mf_ncsnf_TAG20180907T082038_fs4vfmgs_.bkp tag=TAG20180907T082038 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-SEP-18

Starting backup at 07-SEP-18

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=124 RECID=118 STAMP=986199797
channel ORA_DISK_1: starting piece 1 at 07-SEP-18
channel ORA_DISK_1: finished piece 1 at 07-SEP-18
piece handle=/u01/FRA/OCP/backupset/2018_09_07/o1_mf_annnn_TAG20180907T082317_fs4vfogg_.bkp tag=TAG20180907T082317 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/FRA/OCP/archivelog/2018_09_07/o1_mf_1_124_fs4vfo07_.arc RECID=118 STAMP=986199797
Finished backup at 07-SEP-18

RMAN> list archivelog all;

specification does not match any archived log in the repository

 

##查看备份集的大小

RMAN> list backup of database summary;

List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
4 B F A DISK 07-SEP-18 1 1 NO TAG20180907T082038

RMAN> list backup of archivelog all summary;

List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1 B A A DISK 07-SEP-18 1 1 NO TAG20180907T080602
3 B A A DISK 07-SEP-18 1 1 NO TAG20180907T082036
6 B A A DISK 07-SEP-18 1 1 NO TAG20180907T082317

转载于:https://www.cnblogs.com/bondait/p/9607602.html

你可能感兴趣的文章
PKUWC2018 5/6
查看>>
As-If-Serial 理解
查看>>
洛谷P1005 矩阵取数游戏
查看>>
在Silverlight中使用HierarchicalDataTemplate为TreeView实现递归树状结构
查看>>
无线通信基础(一):无线网络演进
查看>>
如何在工作中快速成长?阿里资深架构师给工程师的10个简单技巧
查看>>
WebSocket 时时双向数据,前后端(聊天室)
查看>>
关于python中带下划线的变量和函数 的意义
查看>>
linux清空日志文件内容 (转)
查看>>
安卓第十三天笔记-服务(Service)
查看>>
Servlet接收JSP参数乱码问题解决办法
查看>>
Ajax : load()
查看>>
MySQL-EXPLAIN执行计划Extra解释
查看>>
Zookeeper概述
查看>>
Zookeeper一致性级别
查看>>
Linux远程登录
查看>>
Linux自己安装redis扩展
查看>>
HDU 1016 Prime Ring Problem(dfs)
查看>>
C#中结构体与字节流互相转换
查看>>
session和xsrf
查看>>