Hacker News new | ask | show | jobs
by peterwwillis 4632 days ago
Rsync is just a file transfer tool with extra options. Deployment involves a lot more pieces. The file transfer component of your deployment could certainly use Rsync, assuming you aren't limited to a particular transport protocol (though rsync does support HTTP proxies!)

Here are some of the neat features of Rsync you can take advantage of for deployments:

* Fault tolerance: when an error happens at any layer (network, local i/o, remote i/o, etc), Rsync will report it to you. Trapping these errors will give you better insight into the status of your deployments.

* Authentication: the Rsync daemon supports its own authentication schemes.

* Logging: report various logs about the transfer process to syslog, and collect from these logs to learn about the deployment status.

* Fine-grained file access: use a 'filter', 'exclude' or 'include' to specify what files a user can read or write, so complex sets of access can be granted for multiple accounts to use the same set of files (you can also specify specific operations that will always be blocked by the daemon)

* Proper permissions: force the permissions of files being transferred, so your clients don't fuck up and transfer them with mode 0000 perms ("My deploy succeeded, but the files won't load on the server! Wtf?")

* Pre/post hooks: you can specify a command to run before the transfer, and after, making deployment set-up and clean-up a breeze.

* Checksums on file transfers for integrity

* Preserves all kinds of file types, ownership and modes, with tons of options to deal with different kinds of local/remote/relative paths, even if you aren't the super-user (including acls/xattrs)

* Tons of options for when to delete files and when to apply the files on the remote side (before, during or after transfer, depending on your needs)

* Custom user and group mapping

1 comments

> Checksums on file transfers for integrity

Are you sure rsync doesn't already do this?

I'm saying, this is a feature of Rsync.
Yeah, I completely mis-read your comment.