Copying files from one server to another server?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copying files from one server to another server?
# 1  
Old 08-30-2014
Copying files from one server to another server?

Hi all,

In Server1, one directory contains files now. In this directory, based on some operations, daily some files will generate and store regularly.
Now i want to copy the files to Server2 through SFTP/FTP command on daily based on the previous day present data(i.e based on the latest file date) in Server2 directory.

Example:

In Server1: Files from 01/08/2014 to 29/08/2014.

In Server2: But in this server,

Requirement-1:
i want to copy the files from Server1 based on the latest copied file date in server2 ( i.e when i run on 20/08/2014 i want to know which files with latest date copied. If i have the latest one 19/08/2014 in Server2), whenever i run the script that day files will copy to server2.

Requirement-2: (based on requirement-1)
If i wont run on any day (ex 22/08/2014) or in weekends that day(s) files i missing. So, i want to copy from these days too, on the next run.

Can you please provide the Shell script for this.

Thanking you.
# 2  
Old 08-31-2014
Help doesn't mean doing the work for you…
What have you tried so far?

Last edited by rbatte1; 09-08-2014 at 10:55 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying files to remote server

I am trying to copy code to remote server, doing something like this However it is copying one file and than the script exits i=0; j=0 while read fn; do dir=${fn%/*} # Gets directory path fnm=${fn##*/} # Gets filename excl. path rgx_nwk="s/${nwk}/${nwk}.sac/g" ... (2 Replies)
Discussion started by: kristinu
2 Replies

2. Shell Programming and Scripting

How to preserve time stamp while copying a directory from Server B to Server A?

Experts, Please help me out here. How to preserve time stamp while copying a directory from Server B to Server A (3 Replies)
Discussion started by: ahmed.vaghar
3 Replies

3. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in... (4 Replies)
Discussion started by: gvkumar25
4 Replies

4. UNIX for Dummies Questions & Answers

Copying files from one server to another

I need to copy huge set of data(files & floder) from one server to other. Can any one guide me.I have tried throught ftp mget but it is vain...floder are not moving...... Do suggest me any good method (12 Replies)
Discussion started by: kkalyan
12 Replies

5. UNIX for Dummies Questions & Answers

Copying files from different server

Is there any option to copy files from a different server other than using an SCP command??? thanks,:b: Arun manas (2 Replies)
Discussion started by: arunmanas
2 Replies

6. Shell Programming and Scripting

Copying files from one server to other.

Any one advice here- need to copy some files from one server to other server thru shell programming. (8 Replies)
Discussion started by: samkhu
8 Replies

7. Shell Programming and Scripting

Shell script for copying files from 1 server to other

Hi, I just need a shell script that copies a list of files from a directory in a remote server to my current directory at local server the remote server may contain the following list: /root/pradeep/myfiles/default /root/pradeep/myfiles/dir1 /root/pradeep/myfiles/dir2 ...... (1 Reply)
Discussion started by: paddu
1 Replies

8. UNIX for Dummies Questions & Answers

Copying a list of files from one 'server' to another?

I have two servers. I would like to copy some files from one directory on server A into the same directory on server B. Its not all the files in in the directory, just some of them. Is there a way to make a file list in a txt file and then somehow copy all the files in that list in one go to... (6 Replies)
Discussion started by: Sepia
6 Replies

9. Shell Programming and Scripting

copying files from one server to another server

Hi, I want to transfer files from one linux server to another linux server using shell script using sftp. But I dont won't that while connecting one server to another server it will ask for password , it should be part of script. I wont to know how password should be included in the... (4 Replies)
Discussion started by: manoj.solaris
4 Replies

10. UNIX for Advanced & Expert Users

Copying files between 2 Unix server

Is there a simple way to copy data from one server to a different server? Seems that if 2 servers are on the same network, there should be a simple way to copy between the two. Not just one file. I need to copy a whole directory with subdirectories from one server to a different one. I... (9 Replies)
Discussion started by: Docboyeee
9 Replies
Login or Register to Ask a Question