Solved

Transferring to a New Server

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

758 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

22 Experts available now in Live!

Get 1:1 Help Now