Operating System - HP-UX
1836960 Members
2541 Online
110112 Solutions
New Discussion

Re: How to Create Script that Can rcp Oracle Archive from Server X to Server Y

 
SOLVED
Go to solution
zap_2
Advisor

How to Create Script that Can rcp Oracle Archive from Server X to Server Y

Hi Unix gurus, I am newbie on HPUX.
I have Oracle Archive files on Server X at /u01/adm/arch/prd with file format as arch1_[counter].arc.And I have another server is called Server Y that as a disaster server.How to make rcp script so it can rcp newer archive files from Server X to Server Y every 15 minutes?I appreciate any replaies.Thanks in advanced.
2 REPLIES 2
Indira Aramandla
Honored Contributor
Solution

Re: How to Create Script that Can rcp Oracle Archive from Server X to Server Y

Hi zap,

We copy the archive logs of the various databases that are on archive log mode to the DR server every 20 minutes. This is how we do.

We use the find with â newer parameter to find all the files newer than a touched file and rcp them to the DR server. The find will list all the file newer and output the file name into a text file. Then the script read this file name and replaces with the rcp syntax
Eg:-

find /path -name *archog* -newer filename
rcp -p file_name dr_server:\path\

Once the rcp has completed successfully, at the end we touch the file. So that next time all the archive logs newer than this touched file are coped to the DR server.

I attached the script to do the remote copy of the archive logs to DR Server. We schedule this script through cron to be run every 30 minutes. (for example 09:10, 09:30, 09:50, 10:10..... one database then 09:20,09:40,10:10, 10:30...â ¦. other database and so on).

In you case you can schedule it every 15 minutes. This script will send an e-mail to you if the rcp was not successful.

Note: The copy will be faster if the archive logs are compressed. We have an incremental archive logs backup script which will wait for the archiving, and issue a log switch and then compress the archive logs after backup.

Ind
Never give up, Keep Trying
Sandman!
Honored Contributor

Re: How to Create Script that Can rcp Oracle Archive from Server X to Server Y

imho you need rsync instead of rcp. Just schedule the following command in your crontab file to run every 15 minutes.

# rsync -avz serverX:/u01/adm/arch/prd/ serverY:

rsync is best for doing incremental copies...rcp would copy the entire dir everytime its executed burdening the network