The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Transfering file from unix server to a windows pc Preet IP Networking 1 05-13-2008 12:00 PM
FTP multiple files from remote server to local server berlin_germany Shell Programming and Scripting 2 12-19-2006 11:24 PM
automatic transfering of files using scp tcruicksh Shell Programming and Scripting 1 06-22-2006 06:57 PM
transfering files unix to pc intern UNIX for Dummies Questions & Answers 8 05-30-2006 02:35 AM
Transfering files vbs UNIX for Dummies Questions & Answers 5 06-25-2002 08:24 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-16-2003
Registered User
 

Join Date: Aug 2001
Location: Longview, Washington
Posts: 7
Stumble this Post!
Question Transfering files from one server to another.

My oracle database is generating archive logs. I want to copy those archive logs over to backup server on a regular basis. I know how to create an ftp job and I can put it in my crontab. My problem is that I don't know how to send the files just once instead of sends all the files in the directory over and over.

Example: I have archives 1, 2 & 3 when the cron job starts. It sends archives 1, 2 & 3 over to the other server. Now 6 hours later when the cront job runs again there are archives 1, 2, 3, 4 & 5. How do I make the program know that I have already sent over 1, 2 & 3 so that is only sends 4 & 5? I am thinking that if the ftp could return the contents of the directory on the backup server then some how compare what is in the directories of the two servers and only send over the difference that would solve my problem. I know that I can do a dir to find out what is over there but I don't know how to handle what comes back and then compareing them. Does any one have any ideas or am I on the wrong track entirelly? I appericate your help.
Forum Sponsor
  #2 (permalink)  
Old 09-16-2003
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 486
Stumble this Post!
Check out rsync - exactly what you need & easy to use.
  #3 (permalink)  
Old 09-18-2003
Registered User
 

Join Date: Aug 2001
Location: Longview, Washington
Posts: 7
Stumble this Post!
thanks

Thanks Cameron, we will try that.
  #4 (permalink)  
Old 09-18-2003
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Stumble this Post!
Also rcp is great if you can ensure the files are NOT writable on the destination server....


#man rcp
Copy Multiple Files
rcp [-p] [-S size] [-R size] source_file1 [source_file2]... dest_dir

dest_file ......... This option specifies the name of the destination
file. If host name and path name are not
specified, then the existing file is copied into a
file named dest_file in the current directory on
the local system. If dest_file already exists and
is writable, then the existing file is
overwritten. The destination file names are
constructed in the same way as source files except that the usage of file name expansion characters
is forbidden in the case of destination file
names.
__________________
My brain is your brain
  #5 (permalink)  
Old 09-18-2003
Registered User
 

Join Date: Aug 2001
Location: Longview, Washington
Posts: 7
Stumble this Post!
Thanks I will look into that also.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0