Database초보우낙

31. Rman을 사용해서 모든 datafile과 control file 삭제하고 복구하기 본문

백업과 복구/백업과 복구(Rman)

31. Rman을 사용해서 모든 datafile과 control file 삭제하고 복구하기

오운학 2024. 4. 15. 23:40

controlfile data file들을 모두 삭제할 것이기때문에 복구할때 controlfile부터 복원하면서 복구해야한다

 

■순서

#1. Rman으로 fullbackup 수행

#2 control file auto backup본이 있는지 확인

#3. shutdown abort

#4. os 가서 모든 data file control file 삭제

#5. startup

#6. rman으로 접속

#7. autobackup본에서 control file 복원

#8. DB mount 올란다

#9. 모든 datafile 복원

#10. 데이터베이스를 복구

#11. resetlogs open시킨다

#12. full backup

 

 

구현
 

#1. Rman으로 fullbackup 수행

backup database;

 

#2 control file auto backup본이 있는지 확인

list backup of controlfile;

 

#3. shutdown abort

#4. os 가서 모든 data file control file 삭제

#5. startup

 

#6. rman으로 접속

 

#7. autobackup본에서 control file 복원

restore controlfile from autobackup;

 

#8. DB mount 올린다

alter database mount;

 

#9. 모든 datafile 복원

restore database;

 

#10. 데이터베이스를 복구

recover database

#11. resetlogs open시킨다

alter database open resetlogs;

 

#12. full backup

backup database;