1833828 Members
1984 Online
110063 Solutions
New Discussion

Script for replication

 
SOLVED
Go to solution
coollllllllllll
Regular Advisor

Script for replication

Hi ,

Am looking for  a script to replicate files between DC n DR
We have s structure say /test1  where many subfolders are there and the sme gets updated , can i transfer only the updated contents from Dc to DR via script say running in cron evry 15 min.

 

I tried newer option , but it just chokes the B/W , any other method to replicate the same.

we have a link of 45 Mbps

 

Ex :  any file gets updated in DC /test1/temp.txt should be ftp'd to  DR /test1/temp.txt

both hpux servers 11iv2.
rx2660
4c/16gb

4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: Script for replication

Have you looked into using rsync?

 

>I tried -newer option, but it just chokes the B/W

 

With find? This should be the minimum number of files to copy.

(What is B/W, bandwidth?)

 

You could also gzip the files before copying them.  If there are lots of small files, you could also tar them up.

coollllllllllll
Regular Advisor

Re: Script for replication

Hi Dennis,

 

Can i use rsync for the wholemount point.

Suppose my application is writing in a /test/wer/1 directory and many other subdirectory too.

 

Is it fine if i just do the following and put it in cro afetr evry 15 min.

 

 rsync -zrv --include="*.*" server1:/test/wer/1  /test/wer/1

Dennis Handly
Acclaimed Contributor
Solution

Re: Script for replication

>Can I use rsync for the whole mount point.

 

Yes.  Or many of them.

 

>Is it fine if I just do the following and put it in cron after every 15 min.

>rsync -zrv --include="*.*" server1:/test/wer/1  /test/wer/1

 

You want to pull from server1?  And you only want to include files with a "."?

coollllllllllll
Regular Advisor

Re: Script for replication

Thanks Dennis,
rsync works like a charm