This guide demonstrates how to transfer data from a Hetzner Dedicated Server to a StorageBox, and vice versa, using rsync over SSH (with Hetznerโs custom port 23).
๐ Copy from Dedicated Server TO StorageBox
โ Example command:
rsync -avp --progress -e "ssh -p 23" /home/backups/project-data username-sub1@username.your-storagebox.de:./
๐ Example Breakdown:
/home/backups/project-dataโ Folder on your dedicated server you want to copy.username-sub1โ Replace with your actual StorageBox sub-account username.username.your-storagebox.deโ Replace with your StorageBox hostname.:./โ This means “store in the root folder of the StorageBox account”.
๐ Copy from StorageBox TO Dedicated Server
โ Example command:
rsync -avp --progress -e "ssh -p 23" ./ root@server.example.com:/home/restore/
๐ Example Breakdown:
./โ Folder in your StorageBox you want to copy.rootโ Username on your destination server (can also be a cPanel user, likeuser123).server.example.comโ Replace with the actual hostname or IP of your dedicated server./home/restore/โ Target directory on the dedicated server.
๐ Optional: Enable Passwordless SSH (Recommended)
To avoid repeated password prompts, you can set up SSH key authentication:
On the dedicated server, generate a key (if you havenโt already):
ssh-keygen
Copy the public key to your StorageBox:
ssh-copy-id -p 23 username-sub1@username.your-storagebox.de
You should now be able to use rsync without being prompted for a password.
๐ Notes
- You must have SSH access enabled for your StorageBox sub-account.
rsynconly transfers differences โ great for incremental backups.- Use
--deleteto sync and remove files not present in the source (be cautious!).
