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