Implementation of regular Oracle Database Backup in Ubuntu

Source: Internet
Author: User

Recently, you need to regularly back up Oracle databases in Ubuntu using cron. The specific steps are as follows:

1. Configure the environment variable/home/oracle/. profile for oracle users.

# For oracle
Export ORACLE_HOME =/opt/ora10
Export ORACLE_SID = orcl
Export ORACLE_OWNER = oracle
Export PATH = $ PATH: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/lib32:/usr/lib
Export DISABLE_HUGETLBFS = 1
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK

2. Write the data export script to expdb. sh.

Source/home/oracle/. profile
Exp xx/xx file =/usr/local/aaa. dmp

Grant script authorization

Chmod 777 expdb. sh

3. Write the scheduled task crontab-u oracle-e

00 17 ** 1-5/usr/local/cjd/expdb. sh # indicates that the instance runs at every day from Monday to Friday.

4. view the scheduled task of this user

Crontab-u-l

5. Everything is finished.

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.