rman-0level全备份及恢复
2018-08-21
rman需要提前开启归档模式。
1、Primary库
rman target /
configure controlfile autobackup on;
2、show all;
configure controlfile autobackup format for device type disk to '/data1/rman/%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/data1/rman/full_%s';
3、全备份并指定 backup database format '/orabak/whole_%d_%U';
backup database format '/data1/rman/rman_bak_%d_%U'; 直接备份
LIST BACKUP OF DATABASE;
全备份增加归档日志
backup database format '/data1/rman/bk_db_%U' plus archivelog;
#################
4、 全备份,默认Format
backup incremental level 0 database;
backup incremental level 1 database;
###############
5、RMAN> list backup;
using target database control file instead of recovery catalog
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/20/2018 18:52:37
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 5368709120 limit
alter system set db_recovery_file_dest_size=100G scope=both;
6、同步到standby
startup nomount
恢复ctl
startup force nomount pfile=¨F:\ORAHOME1\DATABASE\INITMYDB.ORA¨;
restore controlfile from ¨f:\backup\mydb\C-2543439098-20070720-01¨;
restore controlfile from '/tmp/2.ctl';
restore controlfile from '/data1/rman';
7、恢复数据
RMAN> alter database mount;
RMAN> restore database;
7、restore database;
分类:数据库 | 标签: dg、oracle |
相关日志