Sure, deploying over rsync is fairly straight forward. It is basically just a way to move files. Rsync will check file differences and only upload files that have changed.
Here's what I use typically - something like this:
rsync -vzrS --exclude=".*" --exclude="node_modules" --exclude="publish.sh" /pathto/local/code user@remote-host:/var/www/remote-website
This will:
- Exclude dot files (such as
.gitdir,.gitignorefile, etc), node_modules and the publish.sh file (where I keep the above script) -
-vzrS- Verbose, Compress, Recursive, Sparse files (google that one) -
user@remote-hostwould be the same way user/host you use to SSH into your server
As for handing storage/logs and cache. Rsync will copy over from your local files to remote, so you may get some local log files in your remote server, unless you exclude those files when deploying over rsync. I think you should be able to exclude those via more --exclude flags.
Last note: Rsync implies that you have SSH access to your server, so consider using rsync to send files locally, and then using something like fabric or envoy to run any additional needs, such as reload php-fpm or restarting queue jobs. Envoy/Fabric and similar SSH task runners can run commands on the server, while rsync can only push and pull files to/from a server.