sync files from two different servers.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sync files from two different servers.
# 1  
Old 03-10-2009
sync files from two different servers.

I have a directory called UNIX 1 which contains 2 files and uploaded into two different servers. Now I want to check whether the directory contains both the files. If not, then need to sync the directory.

Please let me know how to do that in shell scripting.
# 2  
Old 03-10-2009
rsync is the answer. That utility will check for differences and synchronize the 'chunks" of the file that are different.
# 3  
Old 03-10-2009
wget can also be used if you always need to only download the new/modified files. We do have a unix script running in PROD that uses "wget" to sync up the local directory with the remote ftp server by downloading the new/modified files.

wput can be used to do the other way round that is to only upload new/modified files to the remote ftp directory.

regards,
Arun.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Best practise for keeping cronjobs across 2 servers in sync

Hi all, I have 2 server A and B. B is acting as standby for A. The cronjobs running in A must not be run in B until failover. The activation of cronjobs in B can be manual. In server A, I am doing the following 1) create a cron/job script that does "crontab -l >... (5 Replies)
Discussion started by: javanoob
5 Replies

2. Shell Programming and Scripting

How can we automaitcally sync/copy files from one directoy to another ?

Hi, I would like to achieve below requirement, I have a directory "/mydir" and I want to automatically sync/copy all the content of /mydir directory to "/yourdir" directory all the time. meaning, if some application creates a file in /mydir, it supposed to be copied/available in "/yourdir"... (4 Replies)
Discussion started by: aaron8667
4 Replies

3. Homework & Coursework Questions

java project to sync 2 files

excuse me i have an question, school projcet about writing a java programme to syncronise 2 file in network using fuse with java plz i need help (1 Reply)
Discussion started by: yohana
1 Replies

4. Solaris

Client does not sync date with ntp servers

We had a network problem a couple of days before that caused 1 interface to down and up. But today I have noticed that our date is wrong, our system have 4 servers and the other 3 are OK. I used <date> command, the result is: Fri Jan 2 17:57:55 ICT 1970 I have tried set date to be the same as... (3 Replies)
Discussion started by: salvation3103
3 Replies

5. Shell Programming and Scripting

crontab using shell script to sync files.

Hi, I developed one shell script where it will sync the files using perforce, #!/bin/bash TERM=linux export TERM clear echo "" $PATH echo "" cd /u/userk/p4/p4_client/TES_DATE echo "" echo "Sync p4 " p4 sync echo "Executing for second time " p4 -u userk -p p4net:161 -c... (8 Replies)
Discussion started by: asak
8 Replies

6. Shell Programming and Scripting

Korn shell script to sync/move files that are not in use

Hello all. This may seem like a dumb/easy question but right now I have a little script I made that uses rsync to sync a directory that has files in it that may or may not be complete files. I want to come up with a better solution for this. What it is is I have a directory lets say /incomplete... (4 Replies)
Discussion started by: linuxn00b
4 Replies

7. UNIX for Advanced & Expert Users

How to Sync two servers

Hi All, want to sync. two servers , both are having solaris os. If am updating any thing in one server , it will automatically sync. with the other server . Is it possible , if so den how ? (3 Replies)
Discussion started by: natraj005
3 Replies

8. Web Development

How do you sync tables in mysql between two different servers?

Hi all, I have 2 mysql databases running on two different servers (both can be accessed via ssh to each other). If I have say table ABC on server 1, how can I sync it with table ABC on server 2 if the number of records is different? Both databases are the same structure though server 2 has... (2 Replies)
Discussion started by: muay_tb
2 Replies

9. Red Hat

how to find the red hat servers in time sync

Hi all, Before i'm going to install application on my RHEL servers, I just wanted make sure servers in time sync. How can I find it. Thanks. (1 Reply)
Discussion started by: s_linux
1 Replies

10. 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
Login or Register to Ask a Question