Solved

Transferring to a New Server

Posted on 2002-07-30
4
179 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

680 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