1. 程式人生 > >數據庫備份恢復--備份數據庫

數據庫備份恢復--備份數據庫

courier cif 備份恢復 The aux p s number tab read

備份數據庫註意事項:

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

數據庫備份恢復--備份數據庫