Solved

transferring directory from one unix server to another unix server?

Posted on 2006-07-20
8
367 Views
Last Modified: 2010-04-21
I would like to transfer directory "TestApp" from unix server "A" to Unix server "B". Can you please tell me how I can do this via command line?

Please let me know if you have any questions.Thanks
0
Comment
Question by:g46905
  • 4
  • 3
8 Comments
 
LVL 6

Accepted Solution

by:
bira earned 500 total points
ID: 17146998
if you have scp , from server A you run:
scp -r TestApp serverB:/path

0
 

Author Comment

by:g46905
ID: 17147031
what is scp?
0
 
LVL 6

Expert Comment

by:bira
ID: 17147070
    scp - secure copy (remote file copy program)

SYNOPSIS
     scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
         [-l limit] [-o ssh_option] [-P port] [-S program]
         [[user@]host1:]file1 [...] [[user@]host2:]file2

DESCRIPTION
     scp copies files between hosts on a network.  It uses ssh(1) for data
     transfer, and uses the same authentication and provides the same security
     as ssh(1).  Unlike rcp(1), scp will ask for passwords or passphrases if
     they are needed for authentication.

     Any file name may contain a host and user specification to indicate that
     the file is to be copied to/from that host.  Copies between two remote
     hosts are permitted.
0
 

Author Comment

by:g46905
ID: 17147110

> scp -r TestApp serverB:/path

dont we need to specify the user Id and password of the remote server?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:bira
ID: 17147181
it will ask you for the user/passwd
run it as root

what kind of unix you have ?
0
 

Author Comment

by:g46905
ID: 17147192
sun solaris...

> run it as root

I am not familiar. can you provide an example?

Thanks,
0
 
LVL 6

Expert Comment

by:bira
ID: 17147236
to run it as root you normally should be the system
administrator.
but if you are not the administrator, you can run the
scp command with your own account, since you known
the password of the user/passwd at the remote host.

0
 
LVL 6

Expert Comment

by:JJSmith
ID: 17148673

If you are using Sun Solaris it may be worth looking up 'rdist' is is by far an elegant method of moving files between servers - should the need to do so, be a frequent requirement.

Cheers
JJ.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now