First, use the expdp tool to create a backup script:
Backup. Sh
# Hs_aws_db PRD backup <br/> # By xulong <br/> #2010-09-25 <br/> export oracle_sid = hsoa <br/> export oracle_unqname = hsoa <br/> export oracle_base = /home/Oracle <br/> export oracle_owner = OA <br/> export ORACLE_HOME =/home/Oracle/product/11.2.0/dbhome_1 <br/> export nls_lang = american_america.zhs16gbk <br/> export F2 = exp _ 'date + % Y % m % d % H % M '. bak <br/>/home/Oracle/product/11.2.0/dbhome_1/bin/expdp/'sys/pwd @ hsoa Sysdba/'Directory = data_pump_dir dumpfile = $ F2 schemas = hs_aws_sa reuse_dumpfiles = true <br/> mV/home/Oracle/admin/hsoa/dpdump/$ F2/home/Oracle/backup /<br/> ~ <Br/> ~ <Br/> ~ <Br/> ~
Then set the automatic running time. Here, we use the cron tool provided by Linux to execute the task at every night (For details, refer to the cron help)
Crontab-e
Shell =/bin/bash <br/> 01 01 ***/home/Oracle/backup. Sh