开发者

How to securely transfer

I have two servers -- a backend server, and a frontend server. Every开发者_如何学Go night, the backend server generates static .html files, which are then compressed into .tar format.

I need to write a script that resides on the backend server that will transfer the .tar file to the frontend server, and then decompress that .tar file into to the public web directory of the frontend server.

What is the standard, secure way to do this?

Thanks in advance.


best option for doing this is rsync. It will handle the compression for you and with a sensibly constructed script transfer the minimum. With rsync you don't need to worry about the compression or transfer, just realise that it works. With the right paramters (i.e. ssh

Example rsync:

  /usr/bin/rsync -vxSHrae "ssh -l backups" /opt/redmine backups@example.com::redmine

(replace the obvious and use ssh keys...)


Either use SFTP or just plain FTP on an secure, encrypted connection.


Use IPSec and then copy the files using whatever you currently use.

You'll get authentication (so you know who you're talking to), encryption (so no-one can read the data) and integrity checking (so no-one can twiddle with the bits.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜