Transferring to a New Server

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
timshankAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
yuzhConnect With a Mentor Commented:
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
 
biraCommented:
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
 
ahoffmannCommented:
[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
 
timshankAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.