热备份,oracle热备份1

Oracle热备份只能在归档模式下;如何查看是否处于归档模式:
[oracle@host]$ sqlplus / as sysdba
SQL> archive log list
Database log mode Archive Mode '处于归档模式
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest _disibledevent=>
还原参数文件:
SQL> create spfile from pfile='/home/hostbak/initbacode.ora';
备份系统表空间
第一种
SQL> alter tablespace system begin backup;
Tablespace altered.
SQL> ho cp /home/u01/app/oracle/oradata/barcode/system01.dbf /home/hostbak/barcode/system01.dbf
SQL> alter tablespace system end backup;
Tablespace altered.
第二种:RMAN方式
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production _disibledevent=>
RMAN> backup tablespace system;
Starting backup at 20-MAR-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1059 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/barcode/system01.dbf
channel ORA_DISK_1: starting piece 1 at 20-MAR-12
channel ORA_DISK_1: finished piece 1 at 20-MAR-12
piece handle=/u01/app/oracle/flash_recovery_area/BARCODE/backupset/2012_03_20/o1_mf_nnndf_TAG20120320T132810_7pj5cbjd_.bkp tag=TAG20120320T132810 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 20-MAR-12
channel ORA_DISK_1: finished piece 1 at 20-MAR-12
piece handle=/u01/app/oracle/flash_recovery_area/BARCODE/backupset/2012_03_20/o1_mf_ncsnf_TAG20120320T132810_7pj5cfn4_.bkp tag=TAG20120320T132810 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-MAR-12
还原;
rman>restore tablespace system;
Tags:  冷备份和热备份 冷备份热备份 虚拟机热备份 双机热备份 热备份

延伸阅读

最新评论

发表评论