Reputation: 51
I have two servers -- a backend server, and a frontend server. Every 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.
Upvotes: 3
Views: 107
Reputation: 3290
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.)
Upvotes: 0
Reputation: 19393
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 [email protected]::redmine
(replace the obvious and use ssh keys...)
Upvotes: 4
Reputation: 56390
Either use SFTP or just plain FTP on an secure, encrypted connection.
Upvotes: 3