Solved

Transferring to a New Server

Posted on 2002-07-30
4
177 Views
Last Modified: 2010-04-21
I’m switching to a new server and I would like to transfer the scripts in the cgi-bin to the new server with permissions intact. How can I do this?

Thanks
0
Comment
Question by:timshank
4 Comments
 
LVL 6

Expert Comment

by:bira
ID: 7188048
Hi
  You can use rcp.

  To copy a local file to a remote host, enter:

      rcp localfile host2:/cgi-bin/yourfile
     
   By default, the permissions mode and ownership of an existing destination file are preserved.

   see man rcp.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7188473
[rs]cp will not preserve permissions

make a tar file, [rs]cp or ftp it to the new server, and untar it:
     cd /path/to/cgi-bin && tar cpf cgi.tar *
     scp cgi.tar uset@new-server:/path/to/cgi-bin
     ssh user@new-server tar xf /path/to/cgi-bin/cgi.tar
     
0
 
LVL 38

Accepted Solution

by:
yuzh earned 100 total points
ID: 7189400
You can just use tar via ssh to tar the file across:

at your old server:

cd /path/to/cgi-bin
tar cf - . | ssh user@new-server " (cd /path/to/cgi-bin ; tar xvf - )"


0
 

Author Comment

by:timshank
ID: 7193211
Thanks

Everything went smooth except now I need to figure out how to re-set the password on a few scripts for some reason.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

832 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