当前位置: 首页 > 工具软件 > Manul > 使用案例 >

Manul Backup

凌意
2023-12-01

#RMAN configuration

RMAN> show all;

RMAN configuration parameters 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; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
RMAN configuration has no stored or default parameters
RMAN configuration has no stored or default parameters
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orasys/v92/dbs/snapcf_wind.f'; # default
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 04/25/2012 14:33:05
RMAN-20021: database not set
RMAN-06031: could not translate database keyword

RMAN>

RMAN> configure controlfile autobackup on;

RMAN> configure controlfile autobackup format for device type disk to '/data2/wind/%F'


#Backup

run {
allocate channel ch1 device type disk;
backup
      format '/data2/wind/bk_db_%U'
      database;
      sql 'alter system archive log current';
release channel ch1;
#backup all archive logs
allocate channel ch1 device type disk;
backup
      format '/data2/wind/bk_lg_%U'
      archivelog ALL;
release channel ch1;
}


#Restore controlfile

run {
allocate channel ch1 device type disk;
restore controlfile from '/data2/wind/c-500911986-20120428-03' ;
release channel ch1;
}


#Restore database

run {
allocate channel ch1 device type disk;
restore database ;
recover database ;
release channel ch1;
}

 

 

 

 类似资料:

相关阅读

相关文章

相关问答