Oracle Data regular backup

Source: Internet
Author: User

There is a simple requirement for regular oracle Data Backup: the oracle database is placed on host-a, and I want to back up host-a to specify oracle table data at host-B at every morning. Step 1. Install the oracle environment or oracle instant client on host-B. Step 2. Configure TNS Name Java code on host-B # edit and add the following configuration vi/u01/app/oracle/ network/admin/tnsnames. ora Java code host_a_db = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = host-a) (PORT = 1521 ))) (CONNECT_DATA = (SID = logstat) (SERVER = DEDICATED) Step 3. Compile the shell script Java code vi backup. sh # The content is as follows: exp logstat/xxxx @ host_a_db FILE = snda-'date-d yesterday + % Y % m % d '. dmp TABLES = T1, T2 BUFFER = 64000 # retain only the seven-day backup find/home/oracle/snda_bak-name '*. dmp '-mtime + 6-exec rm-fr {}\; backup file name contains the date of the day before the current date, such effect 'snda-20130415.dmp' Step 4: click crontab 3 3 *** source. bash_profile;/home/oracle/backup. sh> out. log -- end

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.