Rsync with Hetzner storage boxes

In all examples, replace u2xxxxx-sub5 and with the names of your user and storage box.

First, make sure “external reachability” and “ssh” are enabled.

You can make the base directory easily by ftp’ing in first and creating the directory. Next, open the web interface and set the base directory for the sub-account to the one you just created.

To use rsync a directory to the storage box:

rsync -aze 'ssh -p 23' directory-name-here

To use rsync a directory from the storage box into the current directory (signified by a single dot)

rsync -aze 'ssh -p 23' .

You can also connect via ftp.


Because rsync is not running as root on the remote server you cannot preserve all file ownership and symlinks (?), etc. Add the option :


to store user and permission values.

You can also use borg backup over rsync to solve this problem. I use it for some projects but it is not ideal for all uses.

Leave a comment

Your email address will not be published. Required fields are marked *