Syncing files remotely via `rsync`

Home / RSS / Contact me


rsync is a great tool for copying files, especially to/from remote locations, like ssh-servers. I use it almost daily for managing this website and also for backing up some personal files to a server so I have access to them from anywhere. For syncing different computers on the same wifi I recommend Syncthing.

The command

I almost always use

rsync -avzhu --delete src dest

The options in detail

Sometimes I want to exclude a certain directory from being updated/deleted, so I use the --exclude dir option as well.

I use a small wrapper script for deploying to the webserver and for my personal documents I’ve created two wrapper scripts, one for pulling and the other one for pushing.

Want to leave a comment?

If you want to give me some feedback or share your opinion, please contact me via email.

© Niklas Bühler, 2021 RSS / Contact me