Shell Backup Oracle Script 01-Configurable schemas

Source: Internet
Author: User

#!/bin/bash./etc/Profile .~/. Bash_profileoracle_base="/opt/oracle11g"Export Oracle_baseoracle_home="/opt/oracle11g/product/11.2.0"Export Oracle_homeoracle_sid="ORCL"Export Oracle_sidexport Nls_lang=American_america. Zhs16gbkld_library_path="$ORACLE _home/lib:/lib:/usr/lib:/usr/local/lib"Export Ld_library_pathpath="$ORACLE _home/bin:/sbin": $PATHexport pathschemas="Succezbi Sdgsbi"Orabak=/data1/OrabakDD=`Date+%f%S ' BD= the forIinch`Echo$schemas '; DoEXPDP \"/As Sysdba\ "Schemas=${i} directory=orabak dumpfile=${i}_${dd}.dmp logfile=${i}_${dd}.log reuse_dumpfiles=y        SCP${i}_${DD}.dmp [email protected]10.48.43.215:/opt/backup39SCP${i}_${DD}.log [email protected]10.48.43.215:/opt/backup39 Done#在删除文件前测试目录变量是否存在. If the failure exits directly [-Z $orabak] && exit1Find$orabak-mtime +${BD}-execRM-RF {} \;

Shell Backup Oracle Script 01-Configurable schemas

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.