Oracle Data regular backup

Source: Internet
Author: User
Welcome to the Oracle community forum and interact with 2 million technical staff. There is a simple requirement for regular oracle Data Backup: Put the oracle database on host-, I want to back up host-a's specified oracletable data at host-B every morning at 3 o'clock. Step 1. Install the oracle environment or oracleinstantclient on host-B. Step 2,

Welcome to the Oracle community forum and interact with 2 million technical staff> there is a simple requirement for regular oracle Data Backup: Put the oracle database on host-, I want to back up host-a's specified oracle table data at host-B every morning at 3 o'clock. Step 1. Install the oracle environment or oracle instant client on host-B. Step 2,

Welcome to the Oracle community forum and interact with 2 million technical staff> enter

Oracle Data regular backup

There is a simple requirement: the oracle database is placed on host-a. I want to back up host-a's specified 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 in host-B

Java code

# 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 shell scripts

Java code

Vi backup. sh # content:

Exp logstat/xxxx @ host_a_db FILE = snda-'date-d yesterday + % Y % m % d'. dmp TABLES = T1, T2 BUFFER = 64000

# Only 7-day backup is retained

Find/home/oracle/snda_bak-name '*. dmp'-mtime + 6-exec rm-fr {}\;

The backup file name contains the date of the day before the current date, so the effect is "snda-20130415.dmp"

Step 4: Mount crontab

3 3 *** source. bash_profile;/home/oracle/backup. sh> out. log

-- End

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.