首页 > 代码库 > rman2

rman2

 

归档日志的备份

RMAN> list archivelog all;
show archivelog deletion policy;
configure archivelog deletion policy;
configure archivelog deletion policy to backed up 1 times to disk;
配置归档删除策略,只要求归档备份一次到磁盘,之后归档就允许被删除。
backup archivelog all delete all input;
备份归档的同时删除所有输入的归档日志文件。
查看时已经没有归档日志。
RMAN> list archivelog all;
specification does not match any archived log in the repository

RMAN> list backup; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 1 822.00M DISK 00:00:43 07-APR-17 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20170407T092004 Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2017_04_07/o1_mf_annnn_TAG20170407T092004_dgftb4lp_.bkp List of Archived Logs in backup set 1 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 1070 15073605 02-APR-17 15078206 02-APR-17 1 1071 15078206 02-APR-17 15078265 02-APR-17 1 1072 15078265 02-APR-17 15083471 02-APR-17 1 1073 15083471 02-APR-17 15108445 02-APR-17 1 1074 15108445 02-APR-17 15130090 02-APR-17 1 1075 15130090 02-APR-17 15148372 03-APR-17 1 1076 15148372 03-APR-17 15161574 03-APR-17 1 1077 15161574 03-APR-17 15181830 03-APR-17 1 1078 15181830 03-APR-17 15207352 03-APR-17 1 1079 15207352 03-APR-17 15224200 04-APR-17 1 1080 15224200 04-APR-17 15240128 04-APR-17 1 1081 15240128 04-APR-17 15240604 04-APR-17 1 1082 15240604 04-APR-17 15261618 04-APR-17 1 1083 15261618 04-APR-17 15290623 04-APR-17 1 1084 15290623 04-APR-17 15292478 04-APR-17 1 1085 15292478 04-APR-17 15317260 05-APR-17 1 1086 15317260 05-APR-17 15321811 05-APR-17 1 1087 15321811 05-APR-17 15336693 05-APR-17 1 1088 15336693 05-APR-17 15360955 05-APR-17 1 1089 15360955 05-APR-17 15371603 05-APR-17 1 1090 15371603 05-APR-17 15391219 06-APR-17 1 1091 15391219 06-APR-17 15403303 06-APR-17 1 1092 15403303 06-APR-17 15415725 06-APR-17 1 1093 15415725 06-APR-17 15438932 06-APR-17 1 1094 15438932 06-APR-17 15454209 06-APR-17 1 1095 15454209 06-APR-17 15464675 07-APR-17 1 1096 15464675 07-APR-17 15485971 07-APR-17 1 1097 15485971 07-APR-17 15489695 07-APR-17

查看归档的操作系统文件时,已经被删除
[oracle@cn-111-testdb archivelog]$ ls -R
.:
2017_04_02  2017_04_03  2017_04_04  2017_04_05  2017_04_06  2017_04_07

./2017_04_02:

./2017_04_03:

./2017_04_04:

./2017_04_05:

./2017_04_06:

./2017_04_07:

将归档日志文件变成了备份集
[oracle@cn-111-testdb 2017_04_07]$ ll
total 841740
-rw-r----- 1 oracle oinstall 861935104 Apr  7 09:20 o1_mf_annnn_TAG20170407T092004_dgftb4lp_.bkp
[oracle@cn-111-testdb 2017_04_07]$ pwd
/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2017_04_07


 

rman2