Help me understand rsync and deployment

I know that there are different ways you you can push you site to your server. I intend to use git in the future to push my sites, however I am wanting to know more information on how to push my site not using git.

For some reason I am particularly interested in rsync. I am under the impression that this is the standard tool for this sort of activity. I have searched the forums, and there seems to be elaborate scripts involving rync.

Is rsync the de facto standard for transferring your local site to your server??

Would I be wrong in thinking you can push your site to a server using a one line rync terminal command??

No, rsync is the right tool. You will find tons of one liners via Google.

That said there are advantages when using git. But as I don’t use it yet for sync’ing my files other could say more about this. I am planning to separately version the public directory with git pushing the content via git to my server. That would make rollbacks easy.

  1. Yes, rsync is a very good choice.
  2. The motivation for using Git is, for me anyway, to not have to deal with anything but the source (templates, content files). This means that some service (Wercker, CircleCI …) will trigger new builds on new content (or any commit to my Hugo site).

Note that even in step 2) rsync may be a perfect choice for one of the deployment steps (getting the generated site from Wercker to your web server).

A long story, but rsync is an old work horse. Use it.

1 Like