oracle|window| Backup | data | Database FIRST step:
In the D-Packing directory to create a new folder backup, this directory can be arbitrary, copy exp.exe files to this directory, the directory under the new file Expbkup.bat
Exp test/test@test file=d:\backup\%date:~0,10%.dmp log=d:\backup\%date:~0,10%.log compress=n buffer=8092 consistent= Y direct=n constraints=y feedback=10000 grants=y record=y indexes=y triggers=y rows=y
SID is test, username/password is test/test, the exp command is invoked to generate the corresponding data file and log file in the D:\backup directory.
Step Two:
Under Task scheduling in Control Panel, create a new Task Plan Wizard, select the file to perform the task Expbkup.bat, the task name at random Expbkup, choose to perform this task every day, starting 18:00, the starting date defaults to starting from the day, enter username and password, point completion can be added every afternoon 6 : 00 Scheduled tasks for backing up Oracle databases once.
Call Linux date functions to automatically generate an Oracle backup every day
-bash-2.05b$ more/opt/oracle/product/movedata/movedata1.sh
oracle_home=/opt/oracle/product/9.0.2
Export Oracle_home
. /opt/oracle/product/.bash_profile
Export date=$ (date +%y%m%d) #调用linux日期函数, the implementation file is named by date one backup per day
/opt/oracle/product/9.0.2/bin/exp goldring/123456@szdb file=/data/oracledb_backup/goldring.dmp Log=/data/OracleDB _back
Up/loggoldring.dmp Consistent=yes
/opt/oracle/product/9.0.2/bin/exp jltgame/123456@szdb file=/data/oracledb_backup/jltgame$date.dmp log=/data/ Oracledb_ba
Ckup/logjltgame.dmp Consistent=yes
/opt/oracle/product/9.0.2/bin/exp userid=oraclebackup/"abcd456&* (" @szdb owner=moonprincess file=/data/ Oracledb_backup/moon
Princess.dmp log=/data/oracledb_backup/logmoonprincess.dmp Consistent=yes
#ftp-N 10.0.0.3 </opt/oracle/product/movedata/ftpcommand
Put the above script in the crontab
NOTE: Oracle automatic backup is key to adding Oracle's environment variables to the backup script and adding $date variables to the backup file name