Help with server/directory sync


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with server/directory sync
# 1  
Old 04-13-2010
Help with server/directory sync

Hi guys, can you help. I have looked all over the site and can not find the info I'm after. Perhaps I am missing something very obvious. I want to syncronise between 2 servers, I can not use NFS mount/share. So I have been looking at scp, rsync, rdist. Thing is, I want only the newer files to be present on both servers. They must be exactly the same both of them. Users can edit files on either server as this is controlled by a loadbalancer (I have no access to these). So if file A is updated on machine A, it must be present on machine B (only once a day a CRON will run the script). If however, a user updates file A on machine B, it must not be overwritten by machine A's update cycle. It should be a case of running a remote command on machine B from machine A, extracting the dates comparing the dates/time and if they are newer, then copy them, otherwise don't. Does anyone have any suggestions on the script or a built in switch using one of the existing commands. This is a UNIX Solaris 10 platform, there is no -P switch in rdist and I have the keys copied to each machine which will ensure no password prompt each time. Smilie

Any help would be greatly appreciated.
# 2  
Old 04-13-2010
You want to investigate the -u option for rsync, it sounds like what you're looking for.
# 3  
Old 04-14-2010
Much appreciated Kodak, funny how sometimes it takes soneone else to look at something to see the woods for the trees.

Cheers

Chris
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SVN main directory sync

I'm quite new to SVN and having configured it based on tutorials from youtube etc, I have it setup like below: * User1 and User2 can commit and update using their own passwords, * Updates from both user1 and user2 are visible to each other * files are shared between both user1 and user2 *... (2 Replies)
Discussion started by: busyboy
2 Replies

2. Linux

Questions about the NTP time server sync

Hi folks, I have developed a Linux server for my customer. After migrating the server to my customer site, I was trying to sync its time to the NTP time servers at my customer site. Below is the ntp.conf: % vi /etc/ntp.conf # Permit time synchronization with our time source, but do not # permit... (2 Replies)
Discussion started by: kimurayuki
2 Replies

3. UNIX for Dummies Questions & Answers

sync directory

Hi, I have directory name as TEST on server1 and same directory TEST on server2 now i need to using these directories as new directories and files will be generated by application in TEST directory daily. I dont have rsync package on server. My approach is by lists all sub-directories... (1 Reply)
Discussion started by: tushar_spatil
1 Replies

4. UNIX for Dummies Questions & Answers

To sync folder for 3 server and all 3 is master

I have 3 server with same folder name and path in it /home/test. But the data in folder quantity is not same for 3 of them and I want to sync the data inside the each folder to be equal. Its not like master and client, but looks like all three server is master to copy to each other. 1- Can rsync... (2 Replies)
Discussion started by: hezry79
2 Replies

5. UNIX for Dummies Questions & Answers

Sync files between unix client and windows 2003 server

Hi everybody... I want to sync files between unix client machine and windows 2003 server machine. I thought of using Cygwin for windows server and then rsync between two to sync files, but have come to know that might be Cygwin will not be able to handle multiple clients request.... Can any... (2 Replies)
Discussion started by: lokeshsingla
2 Replies

6. Solaris

Sync to Green vs. Separate Sync

Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas? ... (0 Replies)
Discussion started by: psantinello
0 Replies

7. UNIX for Advanced & Expert Users

Sync Time/date with NTP server

Hello all, What would be the most convienint and proper way on syncing up the time and date on Solaris 8 servers with an NTP server? Any help would be appreciated. Thanks (2 Replies)
Discussion started by: Sunguy222
2 Replies

8. SuSE

unable to sync the time with ntp server

Hi folks, The server time is no tgetiing synched up with the NTP server. I tried ntpdate -u <ipadress> this is not working. please help out. regards, Sag. (7 Replies)
Discussion started by: sag71155
7 Replies

9. UNIX for Advanced & Expert Users

How To Provide Time Sync Using Nts-150 Time Server On Unix Network?

can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies
Login or Register to Ask a Question