Oracle Backup Scripts

Source: Internet
Author: User

#!/bin/sh
Export oracle_base=/app/oracle/
Export Oracle_home=/app/oracle/product
Export path= $ORACLE _home/bin: $HOME/bin: $PATH
Export Oracle_owner=oracle
Export ORACLE_SID=ORCL
#数据库备份存放目录
#BACKUP_DIR =/home/oracle/databack
#进行备份
#备份数据库名
Backup_user=test_bak
#数据库密码
Backup_password=oracle
Su-oracle-c "/U01/APP/ORA10/PRODUCT/BIN/EXPDP $BACKUP _user/$BACKUP _password schemas= $BACKUP _user directory=my_dir dumpfile= $BACKUP _user.dmp log= $BACKUP _user.log "
#将备份进行压缩存档
CD $BACKUP _dir
TAR-ZCVF $BACKUP _user-' Date +%y%m%d%h%m '. tar.gz $BACKUP _user-' Date +%y%m%d%h%m '. DMP $BACKUP _user-' Date +%y%m%d%h%m '. Log
List= ' Find $BACKUP _dir-mtime +10 '
Echo $list
Rm-f $list

ALTER SYSTEM SET db_recovery_file_dest_size=5g Scope=both


Oracle Backup Scripts

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.