STARTUP MOUNT → ALTER DATABASE ARCHIVELOGlog_archive_start=truelog_archive_format=%S.arc, log_archive_dest=/arch12/archx01.dmpc*.dmpi*.dmp(週一~五). /u11/demo/.profile
exp system/manager inctype=INCREMENTAL file=i01.dmp
FTP -n << !
open 10.10.10.40
user demo demo
binary
prompt
cd backup40
put i01.dmp
close
bye
!
JS=`ls c*.dmp|wc -l`
if test $JS = 0; then exp ... inctype=CUMULATIVE file=c01.dmp; ftp ...; fi
if test $JS = 1; then exp ... inctype=CUMULATIVE file=c02.dmp; ftp ...; fi
if test $JS = 2; then exp ... inctype=CUMULATIVE file=c03.dmp; ftp ...; fi
if test $JS = 3; then exp ... inctype=COMPLETE file=x01.dmp; ftp ...; rm c*.dmp; fi
59 22 * * 1 bin/zlbf1
59 22 * * 2 bin/zlbf2
59 22 * * 3 bin/zlbf3
59 22 * * 4 bin/zlbf4
59 22 * * 5 bin/zlbf5
59 22 * * 6 bin/zlbf6
ALTER TABLESPACE ts_name BEGIN BACKUP;
-- OS 命令備份資料檔
ALTER TABLESPACE ts_name END BACKUP;
多表空間可同時標記開始,備份完畢同時標記結束。
ALTER DATABASE BACKUP CONTROLFILE TO 'filename' REUSE;