RHEL regularly backs up Oracle data on a daily basis

Source: Internet
Author: User

Steps:

(1) Create the script file bak_112.sh with the following content (automatically back up the database based on the current date ):

 export ORACLE_BASE=/u01/app/=/u01/app/oracle/product/11.2.0/==$PATH:/bin:/usr/bin:/usr/sbin:/root:/opt/=$PATH:/opt/local/bin:$ORACLE_HOME/=$(date +%y%m%/h2i3L4v7@XXX full=y file=/u01/app/oracle/${D}.dmp log=/u01/app/oracle/${D}.log

 

 

Make sure this file can be executed,

chmod +x bak_112.sh


(2) generate the crontab file for oracle users in two ways:

1. log on with an oracle user, enter the command crontab-e, enter the edit window, enter the following content, and save it (bak_112.sh is automatically executed every 16: 10 ).

10 16 * * * /u01/app/oracle/bak_112.sh

2. log on with an oracle user/Var/spool/cron/crontabsRun the following command to create an oracle file:

crontab -l

 

Reference: http://docs.oracle.com/cd/E26926_01/html/E25812/enmwx.html#scrolltoc

 

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.