timshank
asked on
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
Thanks
[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/c gi-bin
ssh user@new-server tar xf /path/to/cgi-bin/cgi.tar
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/c
ssh user@new-server tar xf /path/to/cgi-bin/cgi.tar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Everything went smooth except now I need to figure out how to re-set the password on a few scripts for some reason.
Everything went smooth except now I need to figure out how to re-set the password on a few scripts for some reason.
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.