Solved

Transferring to a New Server

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

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

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…
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…
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.:

863 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

23 Experts available now in Live!

Get 1:1 Help Now