Copying files between 2 Unix server | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Copying files between 2 Unix server

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-09-2002
Docboyeee Docboyeee is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 7 December 2007, 2:09 PM EST
Location: Florida
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
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 have a tape drive in each server, however, tapes created on the older server cannot be read by the newer server. UGH!!!

I thought about ftp but there isn't a recursive ftp command that I know of.

Please just shoot me!
Sponsored Links
    #2  
Old 11-09-2002
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 23 October 2014, 1:02 AM EDT
Location: Asia pacific region
Posts: 13,023
Thanks: 522
Thanked 877 Times in 402 Posts
FTP works great using the recursive option.

I mostly use SSH, however, for all machine to machine copies.

www.ssh.com

(used to be free for unix-based systems, not sure now, but get the lastest version... older versions had some security problems...)
Sponsored Links
    #3  
Old 11-09-2002
Docboyeee Docboyeee is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 7 December 2007, 2:09 PM EST
Location: Florida
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
There is a recursive option for ftp ???
    #4  
Old 11-09-2002
biker biker is offline
Registered User
 
Join Date: Sep 2002
Last Activity: 13 April 2013, 9:57 PM EDT
Location: Austin, TX
Posts: 45
Thanks: 0
Thanked 1 Time in 1 Post
Docboyeee,

You could also use the "tar" command to archive the multiple files into a single file. This file could then be copied to the 2nd server with the utility of your choice (e.g. FTP).

If the file is large, you may want to consider compressing it with a program like "gzip" prior to the transfer.


Good luck!

Biker
Systems/Network Administrator
LiveFire Labs - Hands-On Technical e-Learning
www.LiveFireLabs.com
Sponsored Links
    #5  
Old 11-10-2002
luckylwf
Guest
 
Posts: n/a
you can use ftp (with a shell prg ) with correct configure !
what kind of unix did you use?
Sponsored Links
    #6  
Old 11-11-2002
kie kie is offline
Registered User
 
Join Date: Oct 2002
Last Activity: 6 November 2003, 4:22 AM EST
Location: England
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
rcp works recursively you'll need to look into .rhost

a tar and compress followed by and ftp would probably do you the best
Sponsored Links
    #7  
Old 11-15-2002
roden roden is offline
Registered User
 
Join Date: Nov 2002
Last Activity: 27 March 2008, 2:40 PM EDT
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
system A <-> system B

rcp for non-interactive use system B needs a valid IP@ or hostname for systemA in ~/.rhosts (chmod 600 ~/.rhosts), with -r recursive get/put
rexec for non-interactive use system A needs a valid entry in the ~/.netrc file with username and password (machine systemB login username password userpassword init macdef)
ftp non-recursive
ncftpget can do recurseive FTP get with -R
ncftpput FTP put, similar to ncftpget
wget can do recursive HTTP get with -r
ftpcopy can do recursive FTP
curl can do a lot of stuff

You can also mount a NFS filesystem from the other host to your local and do the traditional (in this case with Kornshell):

cd /nfsmountedfilesystem
tar cf - .|(cd /localfilesystemtocopyto&&tar xvf -)

Or why not pipe trough rsh:

rsh "cd /directory&&tar cf - ."|(cd /localdirectory&&tar xvf -)

However if this needs some padding and fiddling depending on rsh/rshd implementations.

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copying files from Unix Server to Local win4luv UNIX for Dummies Questions & Answers 6 06-14-2011 10:11 PM
Copying files from Unix Server to Local win4luv UNIX for Dummies Questions & Answers 1 06-14-2011 09:20 AM
Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp ajaykumarb Shell Programming and Scripting 0 07-21-2010 08:44 AM
writing script in UNIX for copying files in two server REKHA09 Shell Programming and Scripting 4 09-07-2008 01:07 PM
copying directories from NT server to Unix server (solaris 5.8) jhmr7 UNIX for Dummies Questions & Answers 4 08-08-2008 01:53 AM



All times are GMT -4. The time now is 01:12 AM.