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 [email protected]:./
๐ 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" ./ [email protected]:/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 [email protected]
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.
rsync
only transfers differences โ great for incremental backups.- Use
--delete
to sync and remove files not present in the source (be cautious!).