[관리] oracle open backup 예제2

#!/bin/sh

$ORACLE_HOME/bin/sqlplus internal<<EOF

alter tablespace system begin backup;

!cp /home/oracle/oradata/auction/system01.dbf /home/oracle/open_backup/system01.dbf

alter tablespace system end backup;

alter tablespace OEM_REPOSITORY begin backup; !cp /home/oracle/oradata/auction/oemrep01.dbf /home/oracle/open_backup/oemrep01.dbf

alter tablespace OEM_REPOSITORY end backup;

alter tablespace RBS begin backup;

!cp /home/oracle/oradata/auction/rbs01.dbf /home/oracle/open_backup/rbs01.dbf

alter tablespace RBS end backup;

alter tablespace TEMP begin backup;

!cp /home/oracle/oradata/auction/temp01.dbf /home/oracle/open_backup/temp01.dbf

alter tablespace TEMP end backup;

alter tablespace USERS begin backup;

!cp /home/oracle/oradata/auction/users01.dbf /home/oracle/open_backup/users01.dbf

alter tablespace USERS end backup;

alter tablespace INDX begin backup;

!cp /home/oracle/oradata/auction/indx01.dbf /home/oracle/open_backup/indx01.dbf

alter tablespace INDX end backup;

alter tablespace DRSYS begin backup;

!cp /home/oracle/oradata/auction/drsys01.dbf /home/oracle/open_backup/drsys01.dbf

alter tablespace DRSYS end backup;

alter tablespace APDATA1 begin backup;

!cp /home/oracle/oradata/auctionplus/apdata1.dbs /home/oracle/open_backup/apdata1.dbs

!cp /home/oracle/oradata/auctionplus/apdata2.dbs /home/oracle/open_backup/apdata2.dbs

!cp /home/oracle/oradata/auctionplus/apdata3.dbs /home/oracle/open_backup/apdata3.dbs

!cp /home/oracle/oradata/auctionplus/apdata4.dbs /home/oracle/open_backup/apdata4.dbs

!cp /home/oracle/oradata/auctionplus/apdata5.dbs /home/oracle/open_backup/apdata5.dbs

!cp /home/oracle/oradata/auctionplus/apdata6.dbs /home/oracle/open_backup/apdata6.dbs

!cp /home/oracle/oradata/auctionplus/apdata7.dbs /home/oracle/open_backup/apdata7.dbs

!cp /home/oracle/oradata/auctionplus/apdata8.dbs /home/oracle/open_backup/apdata8.dbs

!cp /home/oracle/oradata/auctionplus/apdata9.dbs /home/oracle/open_backup/apdata9.dbs

!cp /home/oracle/oradata/auctionplus/apdata10.dbs /home/oracle/open_backup/apdata10.dbs

!cp /home/oracle/oradata/auctionplus/apdata11.dbs /home/oracle/open_backup/apdata11.dbs

!cp /home/oracle/oradata/auctionplus/apdata12.dbs /home/oracle/open_backup/apdata12.dbs

!cp /home/oracle/oradata/auctionplus/apdata13.dbs /home/oracle/open_backup/apdata13.dbs

!cp /home/oracle/oradata/auctionplus/apdata14.dbs /home/oracle/open_backup/apdata14.dbs

!cp /home/oracle/oradata/auctionplus/apdata15.dbs /home/oracle/open_backup/apdata15.dbs

alter tablespace APDATA1 end backup;

alter tablespace APRBS begin backup;

!cp /home/oracle/oradata/auctionplus/aprbs.dbs /home/oracle/open_backup/aprbs.dbs

alter tablespace APRBS end backup;

alter tablespace APIDX1 begin backup;

!cp /home/oracle/oradata/auctionplus/apidx1.dbs /home/oracle/open_backup/apidx1.dbs

alter tablespace APIDX1 end backup;

alter tablespace APTEMP begin backup;

!cp /home/oracle/oradata/auctionplus/aptemp.dbs /home/oracle/open_backup/aptemp.dbs

alter tablespace APTEMP end backup;

alter tablespace CMAIL begin backup;

!cp /cmail/cmail_db/cmail_data.ora /home/oracle/open_backup/cmail_data.ora

alter tablespace CMAIL end backup;

alter database backup controlfile to ‘/home/oracle/oradata/auction/control01.ctl’

alter database backup controlfile to trace;

alter database backup controlfile to ‘/home/oracle/oradata/auction/control02.ctl’

alter database backup controlfile to trace;

!cp /home/oracle/oradata/auction/redo01.log /home/oracle/open_backup/redo01.log

!cp /home/oracle/oradata/auction/redo02.log /home/oracle/open_backup/redo02.log

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

페이스북/트위트/구글 계정으로 댓글 가능합니다.