반응형


-- 실전 오라클 백업과 복구(생능출판사, 서진수 지음), p.200

-- 1. 닫힌 백업(cold backup) 수행하기
mkdir /data/backup/close
mkdir /data/backup/open
mkdir /data/backup/rman

su - root

chmod 777 /data/backup/close
chmod 777 /data/backup/opem
chmod 777 /data/backup/rman

select name, status from v$datafile;

select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b. status
from v$logfile a, v$log b
where a.group#=b.group#
order by 1, 2;

select name from v$controlfile;

cp /u01/app/oracle/disk1/control01.ctl /data/backup/close
cp /u01/app/oracle/disk2/control02.ctl /data/backup/close
cp /u01/app/oracle/disk3/*.log /data/backup/close
cp /u01/app/oracle/disk3/*.ctl /data/backup/close
cp /u01/app/oracle/disk3/*.dbf /data/backup/close


-- 2. 열린 백업(hot backup) 수행하기

'/u01/app/oracle/oradata/orcl/temp_sms01.dbf'

archive mode로 설정되어 있어야 열린 백업 수행 가능

alter tablespace users begin backup;
!cp '/u01/app/oracle/oradata/orcl/users01.dbf' /data/backup/open/
alter tablespace users end backup;

반응형