* 정상적인 셧다운 상태에서, 모두 동일한 시점에 백업을 받아야 함 *
** 요약 **
1. 백업대상파일조회
2. 디비셧다운
3. 백업대상파일복사
4. 디비스타트업
1. 데이터파일, 컨트롤파일, 리두로그파일, 기타파일(파라미터파일, 패스워드파일) 조회.
SQL> select file_name from dba_data_files; FILE_NAME BYTES/1024/1024 ------------------------------ --------------- /oradata/system01.dbf 700 /oradata/sysaux01.dbf 600 /oradata/undotbs01.dbf 200 /oradata/users01.dbf 5 SQL> select file_name, bytes/1024/1024 from dba_temp_files; FILE_NAME BYTES/1024/1024 ------------------------------ --------------- /oradata/temp01.dbf 20 SQL> select name from v$controlfile; NAME ----------------------------------------------- /oradata/control01.ctl /oradata/control02.ctl SQL> select a.group#, a.member, b.bytes/1024/1024 MB from v$logfile a, v$log b where a.group#=b.group# order by 1, 2; GROUP# MEMBER MB ---------- ------------------------------ ---------- 1 /oradata/redo01.log 50 2 /oradata/redo02.log 50 3 /oradata/redo03.log 50 SQL> show parameter pfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string /oracle/product/11.2.0/dbhome_1/ dbs/spfileARK11G.ora SQL> create pfile from spfile; File created. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options /home/oracle>cd $ORACLE_HOME/dbs /oracle/product/11.2.0/dbhome_1/dbs>ls -rlt orapw* -rw-r----- 1 oracle dba 1536 Aug 24 15:50 orapwARK11G /oracle/product/11.2.0/dbhome_1/dbs>ls -rlt *.ora -rw-r----- 1 oracle dba 2560 Oct 2 16:16 spfileARK11G.ora -rw-r--r-- 1 oracle dba 871 Oct 2 17:42 initARK11G.ora
2. 닫힌 백업(콜드 백업) 수행. (/oracle_coldbackup)
/oracle/product/11.2.0/dbhome_1/dbs>sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 5 13:34:14 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options /oracle/product/11.2.0/dbhome_1/dbs>ls -rlt / total 192 drwxr-xr-x 2 root root 4096 Feb 17 2010 srv drwx------ 2 root root 16384 Aug 23 07:44 lost+found drwxr-xr-x 2 root root 4096 Aug 23 07:44 selinux drwxr-xr-x 15 root root 4096 Aug 23 07:46 usr drwxr-xr-x 3 root root 4096 Aug 23 07:51 tftpboot drwxr-xr-x 23 root root 4096 Aug 23 08:00 var drwxr-xr-x 3 root root 4096 Aug 23 08:13 mnt drwxr-xr-x 3 root root 4096 Aug 23 12:24 home drwxr-xr-x 3 root root 4096 Aug 23 13:25 opt drwxr-xr-x 2 root root 4096 Aug 24 10:23 bin drwxr-xr-x 10 oracle dba 4096 Aug 24 15:48 oracle drwxr-xr-x 3 oracle dba 4096 Aug 24 17:15 oradata dr-xr-xr-x 177 root root 0 Sep 21 13:34 proc drwxr-xr-x 11 root root 0 Sep 21 13:34 sys drwxr-xr-x 2 root root 4096 Sep 21 13:35 media drwxr-xr-x 2 root root 0 Sep 21 13:35 misc drwxr-xr-x 2 root root 0 Sep 21 13:35 net drwxr-xr-x 12 root root 4520 Sep 21 13:35 dev drwxr-xr-x 9 root root 12288 Sep 21 14:54 lib64 drwxr-xr-x 11 root root 4096 Sep 21 14:54 lib drwxr-xr-x 4 root root 3072 Sep 21 14:55 boot drwxr-xr-x 2 root root 12288 Sep 21 14:55 sbin drwxr-xr-x 95 root root 12288 Sep 21 14:55 etc drwxr-xr-x 8 oracle dba 4096 Sep 24 09:09 ark drwxr-x--- 17 root root 4096 Oct 2 13:38 root drwxr-xr-x 3 oracle dba 4096 Oct 2 16:16 arch drwxrwxrwt 18 root root 4096 Oct 5 12:56 tmp drwxr-xr-x 2 oracle dba 4096 Oct 5 13:32 oracle_coldbackup /oracle/product/11.2.0/dbhome_1/dbs>sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 5 13:34:14 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options /oracle/product/11.2.0/dbhome_1/dbs>cd /oradata /oradata>ls -rlt total 1717212 drwx------ 2 oracle dba 16384 Aug 23 07:44 lost+found -rw-r----- 1 oracle dba 20979712 Oct 2 15:15 temp01.dbf -rw-r--r-- 1 oracle dba 52429312 Oct 2 16:16 redo02.log -rw-r----- 1 oracle dba 52429312 Oct 2 16:16 redo01.log -rw-r----- 1 oracle dba 5251072 Oct 5 13:34 users01.dbf -rw-r----- 1 oracle dba 209723392 Oct 5 13:34 undotbs01.dbf -rw-r----- 1 oracle dba 734011392 Oct 5 13:34 system01.dbf -rw-r----- 1 oracle dba 629153792 Oct 5 13:34 sysaux01.dbf -rw-r----- 1 oracle dba 52429312 Oct 5 13:34 redo03.log -rw-r--r-- 1 oracle dba 9748480 Oct 5 13:34 control02.ctl -rw-r--r-- 1 oracle dba 9748480 Oct 5 13:34 control01.ctl /oradata>cp -av *.dbf /oracle_coldbackup/ `sysaux01.dbf' -> `/oracle_coldbackup/sysaux01.dbf' `system01.dbf' -> `/oracle_coldbackup/system01.dbf' `temp01.dbf' -> `/oracle_coldbackup/temp01.dbf' `undotbs01.dbf' -> `/oracle_coldbackup/undotbs01.dbf' `users01.dbf' -> `/oracle_coldbackup/users01.dbf' /oradata>cp -av *.log /oracle_coldbackup/ `redo01.log' -> `/oracle_coldbackup/redo01.log' `redo02.log' -> `/oracle_coldbackup/redo02.log' `redo03.log' -> `/oracle_coldbackup/redo03.log' /oradata>cp -av *.ctl /oracle_coldbackup/ `control01.ctl' -> `/oracle_coldbackup/control01.ctl' `control02.ctl' -> `/oracle_coldbackup/control02.ctl' /oradata>cd $ORACLE_HOME/dbs /oracle/product/11.2.0/dbhome_1/dbs>ls -rlt total 24 -rw-r--r-- 1 oracle dba 2851 May 15 2009 init.ora -rw-r----- 1 oracle dba 24 Aug 24 15:50 lkARK11G -rw-r----- 1 oracle dba 2560 Oct 2 16:16 spfileARK11G.ora -rw-r--r-- 1 oracle dba 871 Oct 2 17:42 initARK11G.ora -rw-r----- 1 oracle dba 1536 Oct 5 13:10 orapwARK11G -rw-rw---- 1 oracle dba 1544 Oct 5 13:34 hc_ARK11G.dat /oracle/product/11.2.0/dbhome_1/dbs>cp -av initARK11G.ora /oracle_coldbackup/ `initARK11G.ora' -> `/oracle_coldbackup/initARK11G.ora' /oracle/product/11.2.0/dbhome_1/dbs>cp -av spfileARK11G.ora /oracle_coldbackup/ `spfileARK11G.ora' -> `/oracle_coldbackup/spfileARK11G.ora' /oracle/product/11.2.0/dbhome_1/dbs>cp -av orapwARK11G /oracle_coldbackup/ `orapwARK11G' -> `/oracle_coldbackup/orapwARK11G' /oracle/product/11.2.0/dbhome_1/dbs>cd /oracle_coldbackup/ /oracle_coldbackup>ls -rlt total 1717204 -rw-r----- 1 oracle dba 20979712 Oct 2 15:15 temp01.dbf -rw-r----- 1 oracle dba 2560 Oct 2 16:16 spfileARK11G.ora -rw-r--r-- 1 oracle dba 52429312 Oct 2 16:16 redo02.log -rw-r----- 1 oracle dba 52429312 Oct 2 16:16 redo01.log -rw-r--r-- 1 oracle dba 871 Oct 2 17:42 initARK11G.ora -rw-r----- 1 oracle dba 1536 Oct 5 13:10 orapwARK11G -rw-r----- 1 oracle dba 5251072 Oct 5 13:34 users01.dbf -rw-r----- 1 oracle dba 209723392 Oct 5 13:34 undotbs01.dbf -rw-r----- 1 oracle dba 734011392 Oct 5 13:34 system01.dbf -rw-r----- 1 oracle dba 629153792 Oct 5 13:34 sysaux01.dbf -rw-r----- 1 oracle dba 52429312 Oct 5 13:34 redo03.log -rw-r--r-- 1 oracle dba 9748480 Oct 5 13:34 control02.ctl -rw-r--r-- 1 oracle dba 9748480 Oct 5 13:34 control01.ctl /oracle_coldbackup>sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 5 13:40:38 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 313159680 bytes Fixed Size 2252824 bytes Variable Size 222302184 bytes Database Buffers 83886080 bytes Redo Buffers 4718592 bytes Database mounted. Database opened.
'오라클백업과복구 > Oracle Backup' 카테고리의 다른 글
열린 백업(핫 백업/온라인 백업) 수행하기 (0) | 2015.10.05 |
---|---|
백업대상 확인하기 (0) | 2015.10.05 |
Password File 관리하기 (0) | 2015.10.05 |