oracle用expdp方式备份脚本
需求:备份oracle数据库并将数据备份的文件上传到ftp所在服务器 ftp服务器IP地址:192.168.6.9 ftp服务器账户/密码:test/test2018 1、oracle用户创建备份脚本路径: #su - oracle $ mkdir /u0/app/backup/bin $ cd /u01/app/backup/bin 2、创建备份脚本: $ vi /u01/app/backup/bin/bak.sh #!/bin/sh source /home/oracle/.bash_profile timedate=$(date +%Y%m%d%H%M%S) bakdbname=hb bakdbpasswd=h1234 dumpbame=hd bakdbhome=/u01/app/backup expdp $bakdbname/$bakdbpasswd directory=backDir dumpfile=$dumpbame-$timedate.dmp logfile=$bakdbname-$timedate.log zip -r $bakdbhome/$dumpbame-$timedate.zip $bakdbhome/$dumpbame-$timedate.dmp $bakdbhome/$bakdbname-$timedate.log #压缩dmp文件及日志文件 find