Copying files between 2 Unix server


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Copying files between 2 Unix server
# 1  
Old 11-09-2002
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!
# 2  
Old 11-09-2002
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...)
# 3  
Old 11-09-2002
There is a recursive option for ftp ???
# 4  
Old 11-09-2002
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
# 5  
Old 11-10-2002
you can use ftp (with a shell prg ) with correct configure !
what kind of unix did you use?
luckylwf
# 6  
Old 11-11-2002
rcp works recursively you'll need to look into .rhost

a tar and compress followed by and ftp would probably do you the best
# 7  
Old 11-15-2002
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 Smilie

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.

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How to copy files from Unix server to Local (6 Replies)
Discussion started by: win4luv
6 Replies

4. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How do i copy files from Unix Server to my Local Desktop.. ANy ideas..please suggest....V Urgent. (1 Reply)
Discussion started by: win4luv
1 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

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 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

writing script in UNIX for copying files in two server

can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
4 Replies

10. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies
Login or Register to Ask a Question