oracle 数据库备份脚本
#!/bin/bash source /home/oracle/bash_profile bkHost=21.96.4.10 bkUser=ftp oracle_dir= bkPath=/jzdata/filea/app_bk/usr/vch/vch/yjbz/crdd_system/backup_oracl cd $oracle_dir expdp cpm/3QAZ2qwe dumpfile=cpm_`date +%Y%m%d`.dmp DIRECTORY=cpm_dir logfile = cpm_`date +%Y%m%d`.log; gzip cpm_`date +%Y%m%d`.dmp ftp -v -n $bkHost<<EOF user $bkUser $bkPasswd binary cd $bkPath lcd $oracle_dir prompt mput cpm_`date +%Y%m%d`.dmp.gz bye EOF find $oracle_dir -name "cpm_*.gz" -type f -mtime +15 -exec rm {} \; #30 0 * * * /bin/bash /app/backup/backupWebLog.sh > /dev/null 2>&1 &